From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaVay-0006Ml-6y for qemu-devel@nongnu.org; Tue, 24 Mar 2015 16:38:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YaVav-0002tw-0e for qemu-devel@nongnu.org; Tue, 24 Mar 2015 16:38:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaVau-0002ts-RN for qemu-devel@nongnu.org; Tue, 24 Mar 2015 16:38:36 -0400 Message-ID: <5511CB4A.6030304@redhat.com> Date: Tue, 24 Mar 2015 14:38:34 -0600 From: Eric Blake MIME-Version: 1.0 References: <1427227433-5030-1-git-send-email-eblake@redhat.com> <1427227433-5030-9-git-send-email-eblake@redhat.com> In-Reply-To: <1427227433-5030-9-git-send-email-eblake@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LqJNp5Txas9V8UA7mpNp5VUTwETRcGkh8" Subject: Re: [Qemu-devel] [PATCH v5 08/28] qapi: Better error messages for bad unions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, lcapitulino@redhat.com, famz@redhat.com, armbru@redhat.com, wenchaoqemu@gmail.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --LqJNp5Txas9V8UA7mpNp5VUTwETRcGkh8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/24/2015 02:03 PM, Eric Blake wrote: > Previous commits demonstrated that the generator had several > flaws with less-than-perfect unions: > - make the use of a base without discriminator a hard error, > since the previous patch removed all remaining uses of it > - a simple union that listed the same branch twice (or two variant > names that map to the same C enumerator, including the implicit > MAX sentinel) ended up generating invalid C code > - checking 'if discriminator' prior to 'if discriminator =3D=3D {}' Another commit typo; should read: checking 'if not discriminator' prior to 'if discriminator =3D=3D {}' > leads to dead code in python, and ended up processing anonymous > unions as if they were simple unions > - an anonymous union that listed two branches with the same qtype > ended up generating invalid C code > - the generator crashed on anonymous union attempts to use an > array type > - the generator was silently ignoring a base type for anonymous > unions > - the generator allowed unknown types or nested anonymous unions > as a branch in an anonymous union >=20 > Signed-off-by: Eric Blake > --- --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --LqJNp5Txas9V8UA7mpNp5VUTwETRcGkh8 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/ iQEcBAEBCAAGBQJVEctKAAoJEKeha0olJ0Nqs6oH/A4w5u3vmlvXtmChs1Isbeix 1EX7/ypQ/wAVY5NsheMVnGTiyjHXmV/WkL40/iXJ3rs7DiAom9tk+j3JP7A87B2q gbXwJoa0EAvrrVEGZmx1CayRz7V1HeuQN/kBH4pK/2q9foeG2Vwma0ZPHM83NR7A i12RbAbVByQTmwbqQMYDk4pfm12T6BAToxoSFQmScLTN+HmojCi5siLY7WhcR6ed 1y3ipoEUq9NM+o8Q1UEuNdpgDFEh++Z0qcWCwAHSBwSg/251yjdJSh37AjoE4/AH u/UAgWJ1U+ytHr4jSOI4WHnsryrlfcmJtr8rZHdWlJxlnfQj79UwzSBxg2ZXLmg= =YYzW -----END PGP SIGNATURE----- --LqJNp5Txas9V8UA7mpNp5VUTwETRcGkh8--