libabigail/tests
Dodji Seketeli 1dcdd54d54 Bug 27204 - potential loss of some aliased ELF function symbols
Sometimes when a symbol S' of a function F' aliases the symbol S of a function
F, the ABIXML reader might not add F' back into the set of exported
functions of the ABI corpus (as the DWARF reader has done initially).
That results in the apparent 'loss' of F' (and S') from the corpus.

This is due to the way F' is identified, using function_decl::get_id.
In the case where the symbol S' of F' has aliases,
function_decl::get_id (wrongly) uses the linkage name of F' as the
identifier.  If F' and F happen to have the same linkage name and if F
is already in the set of exported functions of the corpus then F'
won't be added into that set.

To solve that problem, this patch makes function_decl::get_id
construct an ID that ensures that F and F' always have different IDs.

	* src/abg-ir.cc (function_decl::get_id): If the elf symbol has
	aliases, make the function name be part of the ID so that this ID
	differs from the one of the other functions that share a symbol
	alias with this one.
	* tests/data/test-abidiff/test-PR18791-report0.txt: Adjust.
	* tests/data/test-diff-dwarf/test42-PR21296-clanggcc-report0.txt: Likewise.
	* tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt: Likewise.
	* tests/data/test-diff-filter/test31-pr18535-libstdc++-report-1.txt: Likewise.
	* tests/data/test-diff-filter/test41-report-0.txt: Likewise.
	* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
	* tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
	* tests/data/test-diff-pkg/glibc-2.32-3.fc33.aarch64-self-check-report-0.txt:
	New test reference output.
	* tests/data/test-diff-pkg/glibc-2.32-3.fc33.aarch64.rpm: New test
	input RPM.
	* tests/data/test-diff-pkg/glibc-debuginfo-2.32-3.fc33.aarch64.rpm:
	Likewise.
	* tests/data/Makefile.am: Add the new test material to source
	distribution.
	* tests/test-diff-pkg.cc (in_out_specs): Add the new test input
	RPMs to this test harness.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2021-01-23 16:35:11 +01:00
..
data Bug 27204 - potential loss of some aliased ELF function symbols 2021-01-23 16:35:11 +01:00
lib Update catch2 testing framework: v1.12.2 -> v2.13.3 2020-12-15 11:20:58 +01:00
.gitignore tests/.gitignore: ignore all files starting with runtest* 2020-05-13 11:26:28 +02:00
Makefile.am Use C++11 for the code base 2020-12-03 14:04:23 +01:00
mockfedabipkgdiff.in Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
print-diff-tree.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
runtestcanonicalizetypes.sh.in Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
runtestdefaultsupprs.py.in Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
runtestdefaultsupprspy3.sh.in Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
runtestfedabipkgdiff.py.in Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
runtestfedabipkgdiffpy3.sh.in Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
runtestslowselfcompare.sh.in Bug 26769 - Fix missing types in abixml output 2020-11-23 13:02:34 +01:00
test-abicompat.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-abidiff-exit.cc Add qualifier / typedef / array / pointer test 2020-12-10 10:04:17 +01:00
test-abidiff.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-alt-dwarf-file.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-annotate.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-core-diff.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-cxx-compat.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-diff2.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-diff-dwarf-abixml.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-diff-dwarf.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-diff-filter.cc Remove <memory> usages from abg_compat 2020-12-15 09:08:52 +01:00
test-diff-pkg.cc Bug 27204 - potential loss of some aliased ELF function symbols 2021-01-23 16:35:11 +01:00
test-diff-suppr.cc Drop unneccessary includes of abg-cxx-compat.h 2020-12-15 09:23:44 +01:00
test-dot.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-elf-helpers.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-ini.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-ir-walker.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-kmi-whitelist.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-lookup-syms.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-read-dwarf.cc Remove <memory> usages from abg_compat 2020-12-15 09:08:52 +01:00
test-read-write.cc Drop unneccessary includes of abg-cxx-compat.h 2020-12-15 09:23:44 +01:00
test-svg.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-symtab.cc Update catch2 testing framework: v1.12.2 -> v2.13.3 2020-12-15 11:20:58 +01:00
test-tools-utils.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-types-stability.cc Remove <memory> usages from abg_compat 2020-12-15 09:08:52 +01:00
test-utils.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-utils.h Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-valgrind-suppressions.supp Shut down a helgrind false positive in the "system" libc call 2017-03-17 09:02:19 +01:00
test-write-read-archive.cc Remove <memory> usages from abg_compat 2020-12-15 09:08:52 +01:00
update-test-output.py Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00