mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-19 08:24:32 +00:00
09de4435ce
It appears that two different types from two different translation units might have the same name in a DSO, like in the example of this bug. This violates the One Definition Rule, which we rely on to go fast, and more importantly, it introduces type canonicalization errors. This patch recognizes more of these ODR violation cases by looking at the size of the types. That is, if two types (from the same DSO) with the same name have different sizes, then they are different. * src/abg-ir.cc (type_base::get_canonical_type_for): Look at the size of types with the same name which could be considered ODR-equal, to spot possible violations that would induce a type canonicalization error. * tests/data/test-read-dwarf/test21-pr19092.so: New test input binary. * tests/data/test-read-dwarf/test21-pr19092.so.abi: New reference abixml for the binary above. * tests/data/Makefile.am: Add the new test input above to source distribution. * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust. * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise. * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise. * tests/test-read-dwarf.cc (int_out_specs): Add the two test input above. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
data | ||
Makefile.am | ||
print-diff-tree.cc | ||
runtestcanonicalizetypes.sh.in | ||
test-abicompat.cc | ||
test-abidiff.cc | ||
test-alt-dwarf-file.cc | ||
test-core-diff.cc | ||
test-diff2.cc | ||
test-diff-dwarf.cc | ||
test-diff-filter.cc | ||
test-diff-pkg.cc | ||
test-diff-suppr.cc | ||
test-dot.cc | ||
test-ir-walker.cc | ||
test-lookup-syms.cc | ||
test-read-dwarf.cc | ||
test-read-write.cc | ||
test-svg.cc | ||
test-utils.cc | ||
test-utils.h | ||
test-write-read-archive.cc |