qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Questions on audio_atexit(), possibly bugs


From: malc
Subject: Re: [Qemu-devel] Questions on audio_atexit(), possibly bugs
Date: Fri, 2 Oct 2009 01:26:24 +0400 (MSD)

On Thu, 1 Oct 2009, Markus Armbruster wrote:

> malc <address@hidden> writes:
> 
> > On Thu, 1 Oct 2009, Markus Armbruster wrote:
> >
> >> malc <address@hidden> 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.

-- 
mailto:address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]