qemu-patch-raspberry4/qapi
Markus Armbruster 6c2f9a15df qapi: Make output visitor return qnull() instead of NULL
Before commit 1d10b44, it crashed.  Since then, it returns NULL, with
a FIXME comment.  The FIXME is valid: code that assumes QObject *
can't be null exists.  I'm not aware of a way to feed this problematic
return value to code that actually chokes on null in the current code,
but the next few commits will create one, failing "make check".

Commit 481b002 solved a very similar problem by introducing a special
null QObject.  Using this special null QObject is clearly the right
way to resolve this FIXME, so do that, and update the test
accordingly.

However, the patch isn't quite right: it messes up the reference
counting.  After about SIZE_MAX visits, the reference counter
overflows, failing the assertion in qnull_destroy_obj().  Because
that's many orders of magnitude more visits of nulls than we expect,
we take this patch despite its flaws, to get the QMP introspection
stuff in without further delay.  We'll want to fix it for real before
the release.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Message-Id: <1442401589-24189-21-git-send-email-armbru@redhat.com>
2015-09-21 09:56:49 +02:00
..
block-core.json qcow2: add option to clean unused cache entries after some time 2015-09-04 21:00:32 +02:00
block.json qapi: Use 'struct' instead of 'type' in schema 2015-05-05 18:39:01 +02:00
common.json qapi: Drop inline nested struct in query-version 2015-05-05 18:39:02 +02:00
crypto.json crypto: introduce new base module for TLS credentials 2015-09-15 14:47:37 +01:00
event.json migration: create migration event 2015-07-07 14:54:55 +02:00
Makefile.objs rename parse_enum_option to qapi_enum_parse and make it public 2014-09-08 11:12:43 +01:00
opts-visitor.c qerror: Clean up QERR_ macros to expand into a single string 2015-06-22 18:20:40 +02:00
qapi-dealloc-visitor.c qom: Make enum string tables const-correct 2015-06-19 18:42:18 +02:00
qapi-util.c qom: Make enum string tables const-correct 2015-06-19 18:42:18 +02:00
qapi-visit-core.c qerror: Clean up QERR_ macros to expand into a single string 2015-06-22 18:20:40 +02:00
qmp-dispatch.c qerror: Clean up QERR_ macros to expand into a single string 2015-06-22 18:20:40 +02:00
qmp-event.c qapi/qmp-event.c: Don't manually include os-win32.h/os-posix.h 2015-08-19 16:29:53 +01:00
qmp-input-visitor.c qerror: Clean up QERR_ macros to expand into a single string 2015-06-22 18:20:40 +02:00
qmp-output-visitor.c qapi: Make output visitor return qnull() instead of NULL 2015-09-21 09:56:49 +02:00
qmp-registry.c qemu-ga: Extend 'guest-info' command to expose flag 'success-response' 2013-10-10 14:52:37 -05:00
rocker.json qmp/hmp: add rocker device support 2015-06-12 13:42:17 +01:00
string-input-visitor.c qerror: Clean up QERR_ macros to expand into a single string 2015-06-22 18:20:40 +02:00
string-output-visitor.c Include qapi/qmp/qerror.h exactly where needed 2015-06-22 18:20:41 +02:00
trace.json qapi: Use 'struct' instead of 'type' in schema 2015-05-05 18:39:01 +02:00