[0/6] Fix subtle ABI artifact representation issues

Message ID 87h7pa7n8c.fsf@redhat.com
Headers
Series Fix subtle ABI artifact representation issues |

Message

Dodji Seketeli Nov. 27, 2020, 4:56 p.m. UTC
  Hello,

The goal of this patch set is to fix a class of annoying issues that
have been latent for a while now.

Basically, when comparing the ABI of a binary against its own ABIXML
representation, it is not uncommon to see 'harmless' ABI change
reports being reported.  This should not happen.  In some of the
reports the analyzer can't even describe what the alleged ABI changes
are.  These are all symptoms of subtle wrong representation or
serialization of ABI artifacts.

To work around those issues, the 'abidw --abidiff' and 'abipkgdiff
--self-check' commands were made to avoid emitting an error when
'harmless' ABI changes were detected when comparing the ABI of a
binary to its ABIXML representation.

These series of patches address a number of those wrong representation
issues and thus make 'abidw --abidiff' and 'abipkgdiff --self-check'
emit an error for all changes detected when comparing the ABI of a
binary against its own ABIXML representation.

The first four patches fix four classes of these issues and the last two
patches make 'abidw --abidiff' and 'abipkgdiff --self-check' emit
error upon any ABI change.

Dodji Seketeli (6):
  writer: Emit definitions of declarations when they are present
  ir: Introduce internal pretty representation for anonymous classes
  reader: Don't lose anonymous-ness of decl-only classes
  dwarf-reader: Avoid having several functions with the same symbol
  abidw: make --abidiff report any change against own ABIXML
  abipkgdiff: make --self-check to fail on any change against own ABIXML

 include/abg-fwd.h                             |    3 +
 src/abg-default-reporter.cc                   |    2 +
 src/abg-dwarf-reader.cc                       |   53 +-
 src/abg-ir.cc                                 |   40 +-
 src/abg-reader.cc                             |    2 +
 src/abg-writer.cc                             |   16 +-
 tests/data/test-annotate/libtest23.so.abi     |  140 +-
 .../data/test-annotate/test13-pr18894.so.abi  | 1662 ++--
 .../data/test-annotate/test15-pr18892.so.abi  | 2277 +++---
 .../data/test-annotate/test21-pr19092.so.abi  | 2829 +++----
 .../test-read-dwarf/PR22122-libftdc.so.abi    | 5747 ++++++-------
 tests/data/test-read-dwarf/libtest23.so.abi   |  138 +-
 .../test-read-dwarf/test-libandroid.so.abi    |  196 +-
 .../test-read-dwarf/test10-pr18818-gcc.so.abi |  236 +-
 .../test-read-dwarf/test11-pr18828.so.abi     | 4550 +++++------
 .../test-read-dwarf/test12-pr18844.so.abi     | 7086 ++++++++---------
 .../test-read-dwarf/test13-pr18894.so.abi     | 1511 ++--
 .../test-read-dwarf/test15-pr18892.so.abi     | 2269 +++---
 .../test-read-dwarf/test16-pr18904.so.abi     |   48 +-
 .../test-read-dwarf/test21-pr19092.so.abi     | 2782 +++----
 .../test22-pr19097-libstdc++.so.6.0.17.so.abi |  140 +-
 .../test9-pr18818-clang.so.abi                |  340 +-
 tools/abidw.cc                                |    2 +-
 tools/abipkgdiff.cc                           |    2 +-
 24 files changed, 16697 insertions(+), 15374 deletions(-)