]> sourceware.org Git - libabigail.git/commit
Bug 27970 - Duplicated member functions cause spurious self comparison changes
authorDodji Seketeli <dodji@redhat.com>
Wed, 22 Sep 2021 15:19:10 +0000 (17:19 +0200)
committerDodji Seketeli <dodji@redhat.com>
Wed, 22 Sep 2021 15:19:10 +0000 (17:19 +0200)
commit86a1738d96d0c6e4968be48203175fee0d07a4fc
tree9ec615b531a50c5ba07bc589b885e34534b6e018
parent1115e3f08e8f30e7e412294a563a78a15d0373c1
Bug 27970 - Duplicated member functions cause spurious self comparison changes

Sometimes, in DWARF, a given class can even be defined piece-wise
across several DIEs.  The first DIE would defined some properties and
subsequent DIEs would define others.  dwarf-reader already supports
this for most properties.  Some properties however can be duplicated
across two DIES.

For instance, a DIE describing a class 'C' can define a virtual member
function, and then a subsequent different DIE further describing other
properties of the same class C would define the same virtual member
function again.  In that case, we should not define the virtual member
function twice in the IR of C that is being built.

Libabigail is failing to do exactly that.  It's representing the
virtual member function of C twice in this case.

* src/abg-dwarf-reader.cc (fixup_functions_with_no_symbols): When
the function decl is finally associated to its (publicly defined)
ELF symbol, mark it as being exported.
(finish_member_function_reading): Don't risk marking a virtual
function as being non-virtual when updating its properties.
(build_or_get_fn_decl_if_not_suppressed): Update comment.  If the
member function is already present in the class, do not create a
new one; rather, reuse the existing one.  It's going to be later
updated by finish_member_function_reading.
* tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Adjust.
* tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi: 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-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt:
Likewise.

* tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt:
Likewise.
* tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi: Likewise.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
13 files changed:
src/abg-dwarf-reader.cc
tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi
tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi
tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt
tests/data/test-diff-filter/test31-pr18535-libstdc++-report-1.txt
tests/data/test-diff-filter/test41-report-0.txt
tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt
tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt
tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi
tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi
tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi
tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi
tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi
This page took 0.037189 seconds and 5 git commands to generate.