mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-25 02:38:36 +00:00
9d412ac4b3
The conflict check added by commit c0644771 ("qapi: Reject alternates that can't work with keyval_parse()") doesn't work with the following declaration: { 'alternate': 'Alt', 'data': { 'one': 'bool', 'two': 'str' } } It crashes with: Traceback (most recent call last): File "./scripts/qapi-types.py", line 295, in <module> schema = QAPISchema(input_file) File "/home/ehabkost/rh/proj/virt/qemu/scripts/qapi.py", line 1468, in __init__ self.exprs = check_exprs(parser.exprs) File "/home/ehabkost/rh/proj/virt/qemu/scripts/qapi.py", line 958, in check_exprs check_alternate(expr, info) File "/home/ehabkost/rh/proj/virt/qemu/scripts/qapi.py", line 830, in check_alternate % (name, key, types_seen[qtype])) KeyError: 'QTYPE_QSTRING' This happens because the previously-seen conflicting member ('one') can't be found at types_seen[qtype], but at types_seen['QTYPE_BOOL']. Fix the bug by moving the error check to the same loop that adds new items to types_seen, raising an exception if types_seen[qt] is already set. Backports commit fda72ab4510bcc680a3c4fe55997aa29589884f7 from qemu |
||
---|---|---|
.. | ||
accel | ||
crypto | ||
default-configs | ||
docs | ||
fpu | ||
hw | ||
include | ||
qapi | ||
qobject | ||
qom | ||
scripts | ||
target | ||
tcg | ||
util | ||
aarch64.h | ||
aarch64eb.h | ||
accel.c | ||
arm.h | ||
armeb.h | ||
atomic_template.h | ||
CODING_STYLE | ||
configure | ||
COPYING | ||
COPYING.LIB | ||
cpu-exec-common.c | ||
cpu-exec.c | ||
cpus.c | ||
cputlb.c | ||
exec.c | ||
gen_all_header.sh | ||
glib_compat.c | ||
HACKING | ||
header_gen.py | ||
ioport.c | ||
LICENSE | ||
m68k.h | ||
Makefile | ||
Makefile.objs | ||
Makefile.target | ||
memory.c | ||
memory_ldst.inc.c | ||
memory_mapping.c | ||
mips.h | ||
mips64.h | ||
mips64el.h | ||
mipsel.h | ||
powerpc.h | ||
qapi-schema.json | ||
qemu-timer.c | ||
rules.mak | ||
softmmu_template.h | ||
sparc.h | ||
sparc64.h | ||
tcg-runtime-gvec.c | ||
tcg-runtime.c | ||
translate-all.c | ||
translate-all.h | ||
translate-common.c | ||
unicorn_common.h | ||
VERSION | ||
vl.c | ||
vl.h | ||
x86_64.h |