Bug 24560 - Assertion failure on an abixml with an anonymous type
authorDodji Seketeli <dodji@redhat.com>
Wed, 15 May 2019 10:46:56 +0000 (12:46 +0200)
committerDodji Seketeli <dodji@redhat.com>
Wed, 15 May 2019 10:46:56 +0000 (12:46 +0200)
commitf15b1ea634b3b5533bf65fa3b66f60189ac7b572
tree06ca8677e670a6fad8c4631a5dedb27e8f523575
parent1930f3caf7bf3d56ceb43c1ce1ecf8a3c5bfe1d2
Bug 24560 - Assertion failure on an abixml with an anonymous type

When reading an abixml file, we should not try to re-use an anonymous
class, union or enum because by construction two anonymous unions of
the same (internal) name don't necessarily designate the same type.
We already do that in the ELF/DWARF reader so we need to update the
abixml reader too.

Fixed thus.

* src/abg-reader.cc (read_context::maybe_canonicalize_type): Delay
canonicalization of union types too.
(build_class_decl, build_union_decl): Do not try to re-use
anonymous types.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-reader.cc