]> sourceware.org Git - libabigail.git/commit
rhbz2114909 - Refer to changed base classes using their non-qualified names
authorDodji Seketeli <dodji@redhat.com>
Thu, 20 Oct 2022 10:18:05 +0000 (12:18 +0200)
committerDodji Seketeli <dodji@redhat.com>
Thu, 20 Oct 2022 15:17:09 +0000 (17:17 +0200)
commitc2458fe1ae37ed89868aee890e0d7dcee2bb86d4
tree1b61d84e330db7ed66c3f6260dfafe8f032001e8
parentb8c9f3fa8b53dabcd50981f971e5f0a6cfd4fe2f
rhbz2114909 - Refer to changed base classes using their non-qualified names

This was filled at https://bugzilla.redhat.com/show_bug.cgi?id=2114909

When analysing the edit script representing the changes in the base
base classes of a given class, libabigail refers to the changed base
classes using their names.

The problem is that there can be several changed base classes that
have the same name, even though their /qualified/ names are
different.  That was wreaking having havoc down the road.

To solve the problem, use the qualified name of the base classes,
instead of their simple name.

Note that this change did also ameliorate other existing change
reports in the test suite.

While testing the fix, I realized that class_decl::base_spec doesn't
set its qualified name.  That leads to the fact that it's the
non-qualified name that is used for sorting the base class names in
the change reports.  This can lead to instabilities, depending on the
platform, in test output.  This is also fixed.

Fixed thus.

* src/abg-comparison.cc
(class_diff::ensure_lookup_tables_populated): Refer to the added
or removed base class using its qualified name.
* src/abg-ir.cc (class_decl::base_spec::base_spec): Set the
qualified name of the base_spec.
* tests/data/test-abidiff-exit/test-rhbz2114909-report-1.txt: New
reference test output.
* tests/data/test-abidiff-exit/test-rhbz2114909-v{0,1}.o: New
input test binaries.
* tests/data/test-abidiff-exit/test-rhbz2114909-v{0,1}.cc: Source
code of the binaries, above.
* tests/data/Makefile.am: Add the new test materials above to
source distribution.
* tests/test-abidiff-exit.cc (in_out_specs): Add the new tests to
this harness.
* tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt: Adjust.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-comparison.cc
src/abg-ir.cc
tests/data/Makefile.am
tests/data/test-abidiff-exit/test-rhbz2114909-report-1.txt [new file with mode: 0644]
tests/data/test-abidiff-exit/test-rhbz2114909-v0.cc [new file with mode: 0644]
tests/data/test-abidiff-exit/test-rhbz2114909-v0.o [new file with mode: 0644]
tests/data/test-abidiff-exit/test-rhbz2114909-v1.cc [new file with mode: 0644]
tests/data/test-abidiff-exit/test-rhbz2114909-v1.o [new file with mode: 0644]
tests/data/test-abidiff/test-PR18791-report0.txt
tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt
tests/test-abidiff-exit.cc
This page took 0.034233 seconds and 5 git commands to generate.