OSDN Git Service

hw/arm/allwinner-a10: Fix introspection problem with 'allwinner-a10'
authorThomas Huth <thuth@redhat.com>
Mon, 16 Jul 2018 12:59:31 +0000 (14:59 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 17 Jul 2018 12:12:49 +0000 (13:12 +0100)
commitcf3fccfa8c3ade3da058b3eac09fc1bbaa1ce648
tree7d74e44b53e8f08141d3226a8edaffd4c8f69d23
parent32db1b58caa72f2ae582560f1937b21ea9ee0646
hw/arm/allwinner-a10: Fix introspection problem with 'allwinner-a10'

Valgrind complains:

echo "{'execute':'qmp_capabilities'} {'execute':'device-list-properties'," \
 "'arguments':{'typename':'allwinner-a10'}}" \
 "{'execute': 'human-monitor-command', " \
 "'arguments': {'command-line': 'info qtree'}}" | \
 valgrind -q aarch64-softmmu/qemu-system-aarch64 -M none,accel=qtest -qmp stdio
[...]
==32519== Invalid read of size 8
==32519==    at 0x61869A: qdev_print (qdev-monitor.c:686)
==32519==    by 0x61869A: qbus_print (qdev-monitor.c:719)
==32519==    by 0x452B38: handle_hmp_command (monitor.c:3446)
[...]

Use object_initialize_child() and sysbus_init_child_obj() to fix the issue.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-id: 1531745974-17187-15-git-send-email-thuth@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/allwinner-a10.c