qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/4] qapi: fix crash in dealloc visitor for union types
@ 2014-09-18 20:36 Michael Roth
  2014-09-18 20:36 ` [Qemu-devel] [PATCH v3 1/4] qapi: add visit_start_union and visit_end_union Michael Roth
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Michael Roth @ 2014-09-18 20:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: famz, armbru, qemu-stable, lcapitulino, pbonzini

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

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(+)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-09-19 18:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-18 20:36 [Qemu-devel] [PATCH v3 0/4] qapi: fix crash in dealloc visitor for union types Michael Roth
2014-09-18 20:36 ` [Qemu-devel] [PATCH v3 1/4] qapi: add visit_start_union and visit_end_union Michael Roth
2014-09-18 20:36 ` [Qemu-devel] [PATCH v3 2/4] qapi: dealloc visitor, implement visit_start_union Michael Roth
2014-09-18 20:36 ` [Qemu-devel] [PATCH v3 3/4] tests: add QMP input visitor test for unions with no discriminator Michael Roth
2014-09-18 20:36 ` [Qemu-devel] [PATCH v3 4/4] qemu-iotests: Test missing "driver" key for blockdev-add Michael Roth
2014-09-19 17:52 ` [Qemu-devel] [PATCH v3 0/4] qapi: fix crash in dealloc visitor for union types Luiz Capitulino
2014-09-19 18:21   ` Michael Roth

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).