All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: malc <av1474@comtv.ru>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Questions on audio_atexit(), possibly bugs
Date: Fri, 02 Oct 2009 00:40:42 +0200	[thread overview]
Message-ID: <871vlmwxed.fsf@pike.pond.sub.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0910020124370.2172@linmac.oyster.ru> (malc's message of "Fri\, 2 Oct 2009 01\:26\:24 +0400 \(MSD\)")

malc <av1474@comtv.ru> writes:

> On Thu, 1 Oct 2009, Markus Armbruster wrote:
>
>> malc <av1474@comtv.ru> writes:
>> 
>> > On Thu, 1 Oct 2009, Markus Armbruster wrote:
>> >
>> >> malc <av1474@comtv.ru> writes:
>> >> 
>> >> > On Wed, 30 Sep 2009, Markus Armbruster wrote:
>> >> >
>> >
>> > [..snip..]
>> >
> [..snip..]
>
>> 
>> The ctl_out() and ctl_in() callbacks I checked (ALSA, OSS), get the
>> variable argument unconditionally.
>> 
>> Getting more variable arguments than the caller passed is undefined
>> behavior (C99 7.15.1.1), although in practice is usually gets some
>> unpredictable value, which is harmless as long as it's not actually
>> used.
>
> I wasn't aware of that, thank you for pointing that out.
>
>> 
>> Not getting all variable arguments the caller passed is fine.
>> 
>> So, the calls you fixed up weren't broken in the first place, and the
>> change isn't worth the trouble, in my opinion.
>> 
>> However, there are calls with undefined behavior, because they pass two
>> arguments (two fixed, zero variable), and at least some callees use
>> three (two fixed, one variable).  Fix for that below.
>> 
>
> I'd much rather fix oss and alsa, they should look for poll_mode only in
> case of enable, one more time thanks for heads up.

Makes sense.

Better check the other drivers as well, because I didn't.

  reply	other threads:[~2009-10-01 22:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-30 21:39 [Qemu-devel] Questions on audio_atexit(), possibly bugs Markus Armbruster
2009-09-30 22:42 ` malc
2009-09-30 22:59   ` Markus Armbruster
2009-09-30 23:22     ` malc
2009-10-02 17:04       ` Markus Armbruster
2009-10-02 21:26         ` malc
2009-10-03 11:47           ` Markus Armbruster
2009-10-03 12:21             ` malc
2009-10-03 12:49               ` Markus Armbruster
2009-10-03 12:55                 ` malc
2009-09-30 23:28     ` malc
2009-10-01 15:21       ` Markus Armbruster
2009-10-01 21:26         ` malc
2009-10-01 22:40           ` Markus Armbruster [this message]
2009-10-01 22:49             ` malc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871vlmwxed.fsf@pike.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=av1474@comtv.ru \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.