[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Questions on audio_atexit(), possibly bugs
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] Questions on audio_atexit(), possibly bugs |
Date: |
Fri, 02 Oct 2009 00:40:42 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
malc <address@hidden> writes:
> 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.
Makes sense.
Better check the other drivers as well, because I didn't.
- Re: [Qemu-devel] Questions on audio_atexit(), possibly bugs, Markus Armbruster, 2009/10/01
- Re: [Qemu-devel] Questions on audio_atexit(), possibly bugs, Markus Armbruster, 2009/10/02
- Re: [Qemu-devel] Questions on audio_atexit(), possibly bugs, malc, 2009/10/02
- Re: [Qemu-devel] Questions on audio_atexit(), possibly bugs, Markus Armbruster, 2009/10/03
- Re: [Qemu-devel] Questions on audio_atexit(), possibly bugs, malc, 2009/10/03
- Re: [Qemu-devel] Questions on audio_atexit(), possibly bugs, Markus Armbruster, 2009/10/03
- Re: [Qemu-devel] Questions on audio_atexit(), possibly bugs, malc, 2009/10/03