mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-17 07:24:34 +00:00
The Git repository of the Libabigail Project
e2e253e5b1
Once a type T is canonicalized, its scope is updated so that the vector returned by scope_decl::get_canonical_types() now contains the new canonical type of T. This works, obviously, even when the scope is itself a type. This works well on binaries compiled using C only because, currently, libabigail de-duplicates the DIEs of types. This means that if the scope of T is a non-anonymous type, the class of equivalence of that scope contains just one element. So updating the scope of T implies updating just one scope. On binaries where some files are compiled using C++ however, type DIEs are not de-duplicated. This is just because that feature hasn't yet been implemented in libabigail. Anyway, in that case, if the scope of T is a non-anonymous type, the class of equivalence of that scope contains more than one element. So updating the scope of T implies updating the scope of all the elements of the class of equivalence T. In practise, that means updating the canonical type (scope) of T. Libabigail fails to update the canonical type (scope) of T. Later at abixml emitting time, just emitting the canonical types of the scope of T is not enough to emit the canonical type of T. And that's how the abixml emitter forgets to emit some types as reported in the bug https://sourceware.org/bugzilla/show_bug.cgi?id=27980. This patch fixes that issue. I also noticed that when emitting abixml for unions, the emitter fails to emit the canonical member types of the union, unlike what is done for class types. So that is fixed as well. The binary provided in the bug report is added to the regression testsuite. * src/abg-ir.cc (canonicalize): Update the scope_decl::get_canonical_types() of canonical type of the containing type of the newly canonicalized type. * src/abg-writer.cc (write_union_decl): Write the canonical types contained in the current union scope, just like we do for classes. * tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust. * tests/data/test-types-stability/pr27980-libc.so: New binary input file. * tests/data/Makefile.am: Add the test input file above to source distribution. * tests/test-types-stability.cc (elf_paths): Add the new test input file to this test harness. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
autoconf-archive | ||
bash-completion | ||
doc | ||
include | ||
m4 | ||
relicensing-scripts | ||
scripts | ||
src | ||
tests | ||
tools | ||
.clang-format | ||
.gitignore | ||
abigail.m4 | ||
AUTHORS | ||
ChangeLog | ||
COMMIT-LOG-GUIDELINES | ||
COMPILING | ||
configure.ac | ||
CONTRIBUTING | ||
default.abignore | ||
gen-changelog.py | ||
install-sh | ||
libabigail.pc.in | ||
license-change-2020.txt | ||
LICENSE.txt | ||
ltmain.sh | ||
Makefile.am | ||
NEWS | ||
README | ||
release-text-template.txt | ||
update-copyright.sh | ||
VISIBILITY |
This is the Application Binary Interface Generic Analysis and Instrumentation Library. It aims at constructing, manipulating, serializing and de-serializing ABI-relevant artifacts. The set of artifacts that we are intersted is made of quantities like types, variable, fonctions and declarations of a given library or program. For a given library or program this set of quantities is called an ABI corpus. This library aims at (among other things) providing a way to compare two ABI Corpora (apparently the plural of corpus is copora, heh, that's cool), provide detailed information about their differences, and help build tools to infer interesting conclusions about these differences. You are welcome to contribute to this project after reading the files CONTRIBUTING and COMMIT-LOG-GUIDELINES files in the source tree. Communicating with the maintainers of this project -- including sending patches to be include to the source code -- happens via email at libabigail@sourceware.org.