From: Eric Blake <eblake@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
Michael Roth <mdroth@linux.vnet.ibm.com>
Cc: Markus Armbruster <armbru@redhat.com>,
Anthony Liguori <aliguori@amazon.com>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] qapi-commands.py generates code that uses uninitialized variables
Date: Thu, 10 Apr 2014 19:40:54 -0600 [thread overview]
Message-ID: <53474826.9060903@redhat.com> (raw)
In-Reply-To: <CAFEAcA_iOFzouGri2Pge18jDadqSQbSjW_y2AgDJtsWAuUWicg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1398 bytes --]
On 03/28/2014 08:19 AM, Peter Maydell wrote:
> On 20 March 2014 19:21, Michael Roth <mdroth@linux.vnet.ibm.com> wrote:
>> Could it be as simple as this?:
>>
>> diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
>> index 9734ab0..a70482e 100644
>> --- a/scripts/qapi-commands.py
>> +++ b/scripts/qapi-commands.py
>> @@ -99,7 +99,7 @@ bool has_%(argname)s = false;
>> argname=c_var(argname), argtype=c_type(argtype))
>> else:
>> ret += mcgen('''
>> -%(argtype)s %(argname)s;
>> +%(argtype)s %(argname)s = {0};
>> ''',
>> argname=c_var(argname), argtype=c_type(argtype))
>
> Well, clang doesn't complain about this syntax, and it
> fixes the warnings about bools (which is good, because
> there was a genuine bug in dma-helpers.c that was hiding
> in amongst these other similar warnings...)
>
> Tested-by: Peter Maydell <peter.maydell@linaro.org>
We uncovered a real bug that would be fixed by this patch:
https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg01745.html
Is it worth cleaning this up into a formal submission and cc'ing
qemu-stable and/or trying for the 2.0 release? If made formal, feel
free to add:
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2014-04-11 1:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-17 23:58 [Qemu-devel] qapi-commands.py generates code that uses uninitialized variables Peter Maydell
2014-03-18 9:32 ` Markus Armbruster
2014-03-20 19:21 ` Michael Roth
2014-03-26 14:34 ` Markus Armbruster
2014-03-28 14:19 ` Peter Maydell
2014-04-11 1:40 ` Eric Blake [this message]
2014-04-11 7:27 ` Peter Maydell
2014-04-11 7:48 ` Fam Zheng
2014-04-11 13:11 ` Eric Blake
2014-04-11 13:27 ` Peter Maydell
2014-04-11 14:01 ` Laszlo Ersek
2014-05-20 11:46 ` Peter Maydell
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=53474826.9060903@redhat.com \
--to=eblake@redhat.com \
--cc=aliguori@amazon.com \
--cc=armbru@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=peter.maydell@linaro.org \
--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.