[PATCH 16/16] dwarf-reader: Do not re-use typedefs in a scope

Dodji Seketeli dodji@redhat.com
Thu Sep 7 14:10:07 GMT 2023


Hello,

Sometimes, two typedefs of the same name can appear at the same scope
but point to different types, in DWARF.  Unbelievable but true.  In
those case, we do not want to re-use the typedef, obviously, as we can
possibly misrepresent the type graph in that case.

This fixes one self-comparison issue for the x86_64 sub-package of the
gcc-gnat package that is tested by doing:

    $ fedabipkgdiff --self-compare  -a --from fc37 gcc-gnat

	* src/abg-dwarf-reader.cc (build_ir_node_from_die): Do not re-use
	a typedef from a given scope.
	* src/abg-reader.cc (build_typedef_type): Do not re-use typedefs
	with the same ID.
	* 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-read-dwarf/PR22122-libftdc.so.abi: Likewise.
	* tests/data/test-read-dwarf/test-libandroid.so.abi: Likewise.
	* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
	* tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
	* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
	* tests/data/test-read-dwarf/test16-pr18904.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.
	* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to master.
---
 src/abg-dwarf-reader.cc                       |    10 +-
 src/abg-reader.cc                             |     7 -
 ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi |  8830 ++--
 ...st20-pr19025-libvtkParallelCore-6.1.so.abi | 10776 ++---
 .../test31-pr18535-libstdc++-report-0.txt     |    31 +-
 .../test31-pr18535-libstdc++-report-1.txt     |    31 +-
 .../data/test-diff-filter/test41-report-0.txt |    30 +-
 .../test-read-dwarf/PR22122-libftdc.so.abi    |  6150 +--
 .../test-read-dwarf/test-libandroid.so.abi    |  4862 ++-
 .../test-read-dwarf/test10-pr18818-gcc.so.abi |  2933 +-
 .../test-read-dwarf/test11-pr18828.so.abi     |  1239 +-
 .../test-read-dwarf/test12-pr18844.so.abi     |  3798 +-
 .../test-read-dwarf/test16-pr18904.so.abi     | 12355 +++---
 ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi |  8789 ++--
 ...st20-pr19025-libvtkParallelCore-6.1.so.abi | 10651 ++---
 .../test22-pr19097-libstdc++.so.6.0.17.so.abi | 35982 ++++++++--------
 .../test9-pr18818-clang.so.abi                |   736 +-
 17 files changed, 55160 insertions(+), 52050 deletions(-)

The file is too large for the mailing list so I am attaching it gzipped.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0016-dwarf-reader-Do-not-re-use-typedefs-in-a-scope.patch.gz
Type: application/gzip
Size: 1103862 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libabigail/attachments/20230907/acd616eb/attachment-0001.gz>
-------------- next part --------------

-- 
		Dodji


More information about the Libabigail mailing list