]> git.ipfire.org Git - thirdparty/qemu.git/commit
tests: add QMP input visitor test for unions with no discriminator
authorMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 18 Sep 2014 20:36:42 +0000 (15:36 -0500)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Sun, 4 Jan 2015 19:44:20 +0000 (13:44 -0600)
commit0b2d2e094a8cc13c8924bcf577da7a5fd077033a
tree2a5d5df2d57d28eb7ecb0c99b7bf92cc0632653a
parent4a58f3c2d8acceaefeeffe5a9d3a9acd5cbe08b6
tests: add QMP input visitor test for unions with no discriminator

This is more of an exercise of the dealloc visitor, where it may
erroneously use an uninitialized discriminator field as indication
that union fields corresponding to that discriminator field/type are
present, which can lead to attempts to free random chunks of heap
memory.

Cc: qemu-stable@nongnu.org
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
(cherry picked from commit cb55111b4e425fa3279302fa7306b9a3d5164ff4)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
tests/qapi-schema/qapi-schema-test.json
tests/qapi-schema/qapi-schema-test.out
tests/test-qmp-input-strict.c