From: Eric Blake <eblake@redhat.com>
To: Cole Robinson <crobinso@redhat.com>
Cc: Michael Roth <mdroth@linux.vnet.ibm.com>,
Luiz Capitulino <lcapitulino@redhat.com>,
qemu-devel@nongnu.org, qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qapi-types.py: Fix enum struct sizes on i686
Date: Sat, 31 Aug 2013 20:07:26 -0600 [thread overview]
Message-ID: <5222A15E.10009@redhat.com> (raw)
In-Reply-To: <a9d960fb0b1bc104294ab965116a2d53038b4692.1377988577.git.crobinso@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]
On 08/31/2013 04:36 PM, Cole Robinson wrote:
> Unlike other list types, enum wasn't adding any padding, which caused
> a mismatch between the generated struct size and GenericList struct
> size. More details in a678e26cbe89f7a27cbce794c2c2784571ee9d21
>
> This crashed qemu if calling qmp query-tpm-types for example, which
> upsets libvirt capabilities probing. Reproducer on i686:
>
> (sleep 5; printf '{"execute":"qmp_capabilities"}\n{"execute":"query-tpm-types"}\n') | ./i386-softmmu/qemu-system-i386 -S -nodefaults -nographic -M none -qmp stdio
>
> https://bugs.launchpad.net/qemu/+bug/1219207
>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Cole Robinson <crobinso@redhat.com>
> ---
> scripts/qapi-types.py | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
> - %(name)s value;
> + union {
> + %(name)s value;
> + uint64_t padding;
> + };
Am I right that anonymous unions are only a C11 feature (not C99)? But
you are just copying and pasting from the other uses in this file, so
it's not a problem.
--
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: 621 bytes --]
next prev parent reply other threads:[~2013-09-01 2:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-31 22:36 [Qemu-devel] [PATCH] qapi-types.py: Fix enum struct sizes on i686 Cole Robinson
2013-09-01 2:07 ` Eric Blake [this message]
2013-09-02 3:49 ` [Qemu-devel] [Qemu-stable] " Doug Goldstein
2013-09-02 11:53 ` [Qemu-devel] " Richard W.M. Jones
2013-09-09 18:02 ` Luiz Capitulino
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=5222A15E.10009@redhat.com \
--to=eblake@redhat.com \
--cc=crobinso@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).