mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-25 19:46:25 +00:00
ae8d475ae0
Tighten assertions in the QMP output visitor, so that: - qmp_output_get_qobject() can only be called after pairing a visit_end_* for every visit_start_* (rather than allowing it on a partially built object) - qmp_output_get_qobject() cannot be called unless at least one visit_type_* or visit_start/visit_end pair has occurred since creation/reset (the accidental return of NULL fixed by commit ab8bf1d7 would have been much easier to diagnose) - ensure that we are encountering the expected object or list type, to provide protection against mismatched push(struct)/ pop(list) or push(list)/pop(struct), similar to the qmp-input protection added in commit bdd8e6b5. - ensure that except for the root, 'name' is non-null inside a dict, and NULL inside a list (this may need changing later if we add "name.0" support for better error messages for a list, but for now it makes sure all users are at least consistent) Backports commit 56a6f02b8ce1fe41a2a9077593e46eca7d98267d from qemu |
||
---|---|---|
.. | ||
common.json | ||
Makefile.objs | ||
qapi-dealloc-visitor.c | ||
qapi-visit-core.c | ||
qmp-input-visitor.c | ||
qmp-output-visitor.c | ||
string-input-visitor.c |