From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSDfy-0008JI-BY for qemu-devel@nongnu.org; Thu, 11 Sep 2014 19:21:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSDfo-0003Vr-BC for qemu-devel@nongnu.org; Thu, 11 Sep 2014 19:21:18 -0400 Received: from e31.co.us.ibm.com ([32.97.110.149]:53085) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSDfo-0003VD-4a for qemu-devel@nongnu.org; Thu, 11 Sep 2014 19:21:08 -0400 Received: from /spool/local by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 11 Sep 2014 17:21:07 -0600 From: Michael Roth Date: Thu, 11 Sep 2014 18:20:56 -0500 Message-Id: <1410477659-9163-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 0/3] qapi: fix crash in dealloc visitor for union types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: famz@redhat.com, armbru@redhat.com, qemu-stable@nongnu.org, lcapitulino@redhat.com, pbonzini@redhat.com This series introduces visit_start_enum and visit_end_enum as a way of allowing visitors to trigger generated code to bail out on visiting union fields if the visitor implementation deems doing so to be unsafe. See patch 1 for the circumstances that cause the segfault in the dealloc visitor. This is a spin-off of a patch submitted by Fam Zheng earlier. See the thread for additional background on why we're taking this approach: http://thread.gmane.org/gmane.comp.emulators.qemu/296090 Fam, if you'd like to break out your iotest into another patch I can include it as part of this series, otherwise it can be sent as a follow-up. include/qapi/visitor-impl.h | 2 ++ include/qapi/visitor.h | 2 ++ qapi/qapi-dealloc-visitor.c | 6 ++++++ qapi/qapi-visit-core.c | 15 +++++++++++++++ scripts/qapi-visit.py | 6 ++++++ tests/qapi-schema/qapi-schema-test.json | 10 ++++++++++ tests/qapi-schema/qapi-schema-test.out | 3 +++ tests/test-qmp-input-strict.c | 17 +++++++++++++++++ 8 files changed, 61 insertions(+)