mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-17 23:44:35 +00:00
2d5389f265
The code in abg-ir.cc that calculated the memory size of an array summed, rather than multiplied, the dimensions. It also did duplicate work for each dimension after the first. Existing code in abg-reader.cc asserted that array size information read from XML match freshly calculated values. This patch corrects the calculation, eliminates the duplicate work and updates the XML reader validation to just emit a warning if old bad array size information is found. * include/abg-ir.h (array_type_def::append_subrange): Remove this function. * src/abg-ir.cc (array_type_def::set_element_type): Add a note about safe usage. (array_type_def::append_subrange): Inline this function into its only caller append_subranges and remove it. (array_type_def::append_subranges): Do correct multiplicative calculation of multidimensional array sizes. * src/abg-reader.cc (build_array_type_def): When checking calculated against read array sizes, warn once if value matches old behaviour rather than raising an assertion. Otherwise, before raising an assertion, emit an informative error message. * tests/data/test-annotate/test14-pr18893.so.abi: Correct array sizes. * tests/data/test-annotate/test17-pr19027.so.abi: Ditto. * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi: Ditto. * tests/data/test-annotate/test7.so.abi: Ditto. * tests/data/test-diff-dwarf/test10-report.txt: Ditto. * tests/data/test-diff-dwarf/test11-report.txt: Ditto. * tests/data/test-read-write/test25.xml: Ditto. Reviewed-by: Matthias Maennich <maennich@google.com> Signed-off-by: Giuliano Procida <gprocida@google.com> |
||
---|---|---|
.. | ||
abg-comp-filter.h | ||
abg-comparison.h | ||
abg-config.h | ||
abg-corpus.h | ||
abg-cxx-compat.h | ||
abg-diff-utils.h | ||
abg-dwarf-reader.h | ||
abg-fwd.h | ||
abg-hash.h | ||
abg-ini.h | ||
abg-interned-str.h | ||
abg-ir.h | ||
abg-libxml-utils.h | ||
abg-libzip-utils.h | ||
abg-reader.h | ||
abg-reporter.h | ||
abg-sptr-utils.h | ||
abg-suppression.h | ||
abg-tools-utils.h | ||
abg-traverse.h | ||
abg-version.h.in | ||
abg-viz-common.h | ||
abg-viz-dot.h | ||
abg-viz-svg.h | ||
abg-workers.h | ||
abg-writer.h | ||
Makefile.am |