From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYQSo-000813-4m for qemu-devel@nongnu.org; Thu, 10 Apr 2014 21:41:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WYQSi-0007iN-RG for qemu-devel@nongnu.org; Thu, 10 Apr 2014 21:41:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYQSi-0007iG-Je for qemu-devel@nongnu.org; Thu, 10 Apr 2014 21:41:00 -0400 Message-ID: <53474826.9060903@redhat.com> Date: Thu, 10 Apr 2014 19:40:54 -0600 From: Eric Blake MIME-Version: 1.0 References: <87bnx3vomf.fsf@blackfin.pond.sub.org> <20140320192134.8983.86526@loki> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="DwrBOnBciHQL9ctfta8QTKgW2PUJMX5vB" Subject: Re: [Qemu-devel] qapi-commands.py generates code that uses uninitialized variables List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Michael Roth Cc: Markus Armbruster , Anthony Liguori , QEMU Developers This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --DwrBOnBciHQL9ctfta8QTKgW2PUJMX5vB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/28/2014 08:19 AM, Peter Maydell wrote: > On 20 March 2014 19:21, Michael Roth 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 =3D false; >> argname=3Dc_var(argname), argtype=3Dc_type(a= rgtype)) >> else: >> ret +=3D mcgen(''' >> -%(argtype)s %(argname)s; >> +%(argtype)s %(argname)s =3D {0}; >> ''', >> argname=3Dc_var(argname), argtype=3Dc_type(a= rgtype)) >=20 > 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...) >=20 > Tested-by: Peter Maydell 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 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --DwrBOnBciHQL9ctfta8QTKgW2PUJMX5vB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTR0gmAAoJEKeha0olJ0NqnnoH/1bawll0xtXhmPH6NRFkqDd4 Ld+4ejBJrZRiU2/+6y73duGb35f7XQrjfteBdii+yV5Po2XH6OVooYXfPguEQvrk aLaUfaASYua+qDtxXwuzMC9ZsUSEXCkqUhsLgk1DSOyoRS+O/aFNaLjFkgKOLqO0 Qk41dODyMzzBu1c52aud1LxP2mV7RY44Kwjfniyj6815BiPw+2VMffJ/M/Hk28oo bmHmMuGPtDSnjAjMa5XbCYyaNtQQNTJI6jjND64a3lANUWVwiLKEjJXdDSu7YBHL 1T+mnTqvqTiuSeFb3wrCawc2yIDAziKLcywXA2dtTbZX4W+lnjeEFzroS/kzwmQ= =mvm0 -----END PGP SIGNATURE----- --DwrBOnBciHQL9ctfta8QTKgW2PUJMX5vB--