mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-15 22:44:41 +00:00
18e4697e05
It can happen that arrays are described in DWARF with an unknown upper bound. In those cases, if the array is the type of a global variable, the ELF object corresponding to that global variable should have a size. It's that ELF object size that should be taken into account when comparing versions of that global variable and its type. This patch fixes issues in the detection and representation of array subranges with unknown size so that we behave like presented above. * include/abg-comparison.h (BENIGN_INFINITE_ARRAY_CHANGE_CATEGORY): A new enumerator in the diff_category enum. (EVERYTHING_CATEGORY): Adjust. * src/abg-comparison.cc (get_default_harmless_categories_bitmap): Adjust. (operator<<(ostream& o, diff_category)): Likewise. * include/abg-ir.h (array_type_def::subrange_type::is_infinite): Declare new member function. * src/abg-ir.cc (array_type_def::subrange_type::priv::infinite_): New data member. (array_type_def::subrange_type::priv::priv): Initialize it. (array_type_def::subrange_type::get_length): Better support unknown sized subrange. (array_type_def::subrange_type::is_infinite): Define new member function. * src/abg-comp-filter.cc (has_benign_infinite_array_change): Define new static function. (categorize_harmless_diff_node): Use the new has_benign_infinite_array_change above. * src/abg-dwarf-reader.cc (build_subrange_type): Better recognize a subrange type with unknown upper bound. Represent that with the new array_type_def::subrange_type::is_infinite member property. * src/abg-reader.cc (build_subrange_type): Likewise. * tests/data/test-abidiff/test-PR18166-libtirpc.so.abi: Adjust. * tests/data/test-annotate/libtest23.so.abi: Likewise. * tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Likewise. * tests/data/test-annotate/libtest24-drop-fns.so.abi: Likewise. * tests/data/test-annotate/test14-pr18893.so.abi: Likewise. * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise. * tests/data/test-annotate/test7.so.abi: Likewise. * tests/data/test-read-dwarf/libtest23.so.abi: Likewise. * tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi: Likewise. * tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Likewise. * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise. * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise. * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise. * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise. * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Likewise. * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
data | ||
Makefile.am | ||
mockfedabipkgdiff.in | ||
print-diff-tree.cc | ||
runtestcanonicalizetypes.sh.in | ||
runtestdefaultsupprs.py.in | ||
runtestdefaultsupprspy3.sh.in | ||
runtestfedabipkgdiff.py.in | ||
runtestfedabipkgdiffpy3.sh.in | ||
test-abicompat.cc | ||
test-abidiff-exit.cc | ||
test-abidiff.cc | ||
test-alt-dwarf-file.cc | ||
test-annotate.cc | ||
test-core-diff.cc | ||
test-diff2.cc | ||
test-diff-dwarf-abixml.cc | ||
test-diff-dwarf.cc | ||
test-diff-filter.cc | ||
test-diff-pkg.cc | ||
test-diff-suppr.cc | ||
test-dot.cc | ||
test-ini.cc | ||
test-ir-walker.cc | ||
test-lookup-syms.cc | ||
test-read-dwarf.cc | ||
test-read-write.cc | ||
test-svg.cc | ||
test-types-stability.cc | ||
test-utils.cc | ||
test-utils.h | ||
test-valgrind-suppressions.supp | ||
test-write-read-archive.cc | ||
update-test-output.py |