From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XV2ov-00051k-2b for qemu-devel@nongnu.org; Fri, 19 Sep 2014 14:22:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XV2on-00068W-FA for qemu-devel@nongnu.org; Fri, 19 Sep 2014 14:22:13 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:41834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XV2on-0005z6-C3 for qemu-devel@nongnu.org; Fri, 19 Sep 2014 14:22:05 -0400 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 19 Sep 2014 14:21:59 -0400 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Roth In-Reply-To: <20140919135217.4b473d78@redhat.com> References: <1411072603-8984-1-git-send-email-mdroth@linux.vnet.ibm.com> <20140919135217.4b473d78@redhat.com> Message-ID: <20140919182155.19243.53153@loki> Date: Fri, 19 Sep 2014 13:21:55 -0500 Subject: Re: [Qemu-devel] [PATCH v3 0/4] qapi: fix crash in dealloc visitor for union types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: famz@redhat.com, qemu-stable@nongnu.org, armbru@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com Quoting Luiz Capitulino (2014-09-19 12:52:17) > On Thu, 18 Sep 2014 15:36:39 -0500 > Michael Roth wrote: > = > > This series introduces visit_start_union and visit_end_union 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 > = > Applied to the qmp branch, thanks. > = > PS: Michael, I'm assuming you were not planning to send a pull yourself. > If that's not the case, please let me know. Correct, was planning to check with you first. Thanks! > = > > = > > v3: > > * fixed up commit msg in patch #2 (Eric) > > * rebased on latest master > > = > > v2: > > * added comments to clarify true/false visit_start_union vs. errp > > in dealloc visitor implementation (Eric) > > * fixed a line that was >80 characters (Eric) > > * fixed extra period in patch 2 commit msg (Eric) > > * added comments to note reasons why the interface is useable for > > dealloc visitor, but may require extra QAPI groundwork and > > interface parameters to be useful for other types of visitors > > * included Fam's qemu-iotest test case to exercise bug fix in a > > user-triggerable scenario. > > = > > include/qapi/visitor-impl.h | 2 ++ > > include/qapi/visitor.h | 2 ++ > > qapi/qapi-dealloc-visitor.c | 26 +++++++++++++++++++++++ > > 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/qemu-iotests/087 | 17 +++++++++++++++ > > tests/qemu-iotests/087.out | 13 ++++++++++++ > > tests/test-qmp-input-strict.c | 17 +++++++++++++++ > > 10 files changed, 111 insertions(+) > >