unicorn/qemu
Eric Blake 25dad6e8d5
qmp: Fix reference-counting of qnull on empty output visit
Commit 6c2f9a15 ensured that we would not return NULL when the
caller used an output visitor but had nothing to visit. But
in doing so, it added a FIXME about a reference count leak
that could abort qemu in the (unlikely) case of SIZE_MAX such
visits (more plausible on 32-bit). (Although that commit
suggested we might fix it in time for 2.5, we ran out of time;
fortunately, it is unlikely enough to bite that it was not
worth worrying about during the 2.5 release.)

This fixes things by documenting the internal contracts, and
explaining why the internal function can return NULL and only
the public facing interface needs to worry about qnull(),
thus avoiding over-referencing the qnull_ global object.

It does not, however, fix the stupidity of the stack mixing
up two separate pieces of information; add a FIXME to explain
that issue, which will be fixed shortly in a future patch.

Backports commit a86156401559cb4401cf9ecc704faeab6fc8bb19 from qemu
2018-02-20 08:07:31 -05:00
..
crypto
default-configs
docs
fpu
hw
include qapi: Drop unused 'kind' for struct/enum visit 2018-02-19 23:43:54 -05:00
qapi qmp: Fix reference-counting of qnull on empty output visit 2018-02-20 08:07:31 -05:00
qobject qapi: Convert QType into QAPI built-in enum type 2018-02-19 21:47:05 -05:00
qom qom: Swap 'name' next to visitor in ObjectPropertyAccessor 2018-02-19 23:14:37 -05:00
scripts qapi: Drop unused 'kind' for struct/enum visit 2018-02-19 23:43:54 -05:00
target-arm
target-i386 qom: Swap 'name' next to visitor in ObjectPropertyAccessor 2018-02-19 23:14:37 -05:00
target-m68k
target-mips
target-sparc
tcg
util
aarch64.h
aarch64eb.h
accel.c
arm.h
armeb.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_mapping.c
memory.c qom: Swap 'name' next to visitor in ObjectPropertyAccessor 2018-02-19 23:14:37 -05:00
mips64.h
mips64el.h
mips.h
mipsel.h
powerpc.h
qapi-schema.json qapi: Lazy creation of array types 2018-02-19 18:55:35 -05:00
qemu-log.c
qemu-timer.c
rules.mak
softmmu_template.h
sparc64.h
sparc.h
tcg-runtime.c
translate-all.c
translate-all.h
translate-common.c
unicorn_common.h
VERSION
vl.c
vl.h
x86_64.h