From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 01/12] qapi: Fix regression with '-netdev help'
Date: Thu, 15 Oct 2015 09:51:34 +0200 [thread overview]
Message-ID: <1444895505-16067-2-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1444895505-16067-1-git-send-email-armbru@redhat.com>
From: Eric Blake <eblake@redhat.com>
Commit e36c714e causes 'qemu -netdev help' to dump core, because the
call to visit_end_union() is no longer conditional on whether *obj was
allocated.
Reported by Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1444861825-19256-1-git-send-email-eblake@redhat.com>
[Commit message tweaked to say 'help' instead of '?']
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
scripts/qapi-visit.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py
index 4f97781..d7f51ee 100644
--- a/scripts/qapi-visit.py
+++ b/scripts/qapi-visit.py
@@ -301,7 +301,9 @@ void visit_type_%(c_name)s(Visitor *v, %(c_name)s **obj, const char *name, Error
out_obj:
error_propagate(errp, err);
err = NULL;
- visit_end_union(v, !!(*obj)->data, &err);
+ if (*obj) {
+ visit_end_union(v, !!(*obj)->data, &err);
+ }
error_propagate(errp, err);
err = NULL;
visit_end_struct(v, &err);
--
2.4.3
next prev parent reply other threads:[~2015-10-15 7:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-15 7:51 [Qemu-devel] [PULL 00/12] QAPI patches Markus Armbruster
2015-10-15 7:51 ` Markus Armbruster [this message]
2015-10-15 7:51 ` [Qemu-devel] [PULL 02/12] qapi: Use predicate callback to determine visit filtering Markus Armbruster
2015-10-15 7:51 ` [Qemu-devel] [PULL 03/12] qapi: Prepare for errors during check() Markus Armbruster
2015-10-15 7:51 ` [Qemu-devel] [PULL 04/12] qapi: Drop redundant alternate-good test Markus Armbruster
2015-10-15 7:51 ` [Qemu-devel] [PULL 05/12] qapi: Move empty-enum to compile-time test Markus Armbruster
2015-10-15 7:51 ` [Qemu-devel] [PULL 06/12] qapi: Drop redundant returns-int test Markus Armbruster
2015-10-15 7:51 ` [Qemu-devel] [PULL 07/12] qapi: Drop redundant flat-union-reverse-define test Markus Armbruster
2015-10-15 7:51 ` [Qemu-devel] [PULL 08/12] qapi: Drop redundant args-member-array test Markus Armbruster
2015-10-15 7:51 ` [Qemu-devel] [PULL 09/12] qapi: Don't use info as witness of implicit object type Markus Armbruster
2015-10-15 7:51 ` [Qemu-devel] [PULL 10/12] qapi: Lazy creation of array types Markus Armbruster
2015-10-15 7:51 ` [Qemu-devel] [PULL 11/12] qapi: Create simple union type member earlier Markus Armbruster
2015-10-15 7:51 ` [Qemu-devel] [PULL 12/12] qapi: Track location that created an implicit type Markus Armbruster
2015-10-16 17:41 ` [Qemu-devel] [PULL 00/12] QAPI patches 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=1444895505-16067-2-git-send-email-armbru@redhat.com \
--to=armbru@redhat.com \
--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 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).