public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH, applied] Bug 28364 - libwiretap fails self comparison
@ 2021-10-18  9:00 Dodji Seketeli
  0 siblings, 0 replies; only message in thread
From: Dodji Seketeli @ 2021-10-18  9:00 UTC (permalink / raw)
  To: libabigail

Hello,

In this case, thanks to all the debugging infrastructure in place,
especially the canonical type debugging infrastructure, I was able to
notice that there was a canonicalization error on a function type when
reading the libwiretap binary as in:

    $ build/tools/abidw --debug-tc /usr/lib64/libwiretap.so.11.0.8
    structural & canonical equality different for type: function type void (wtap*)
    in compare_types_during_canonicalization at: /home/dodji/git/libabigail/PR28364/src/abg-ir.cc:13575: execution should not have reached this point!
    Abandon (core dumped)
    $

When digging deeper, I noticed that, in the DWARF reader, when
building a function type, we are associating a "textual
representation" of the function type 'void (wtap*)' to its DIE (inside
the current translation) way too early.

By too early, I mean, the association was done before the function
type was fully 'built'.  Its parameters were not 'collected', for
instance.  So that means that a 'pointer to that function type' could
be formed, with a wrong representation, during the time where the
function type wasn't fully formed.  Just moving the association to
after the type was fully constructed solved the issue.

This one was hard to spot!

Later, this uncovered the fact that we could now have (and thus
serialize) member functions of unions.  And it turned out the abixml
reader didn't expect those.  Oops.  I fixed that one as well.

	* src/abg-dwarf-reader.cc (build_function_type): Associate the DIE
	representation to the constructed type once it's fully built.
	* src/abg-reader.cc (build_function_type): Support member function of unions.
	* tests/data/Makefile.am: Add the new test input files to the
	source distribution.
	* tests/data/test-diff-pkg/wireshark/wireshark-cli-3.4.9-1.fc36.x86_64-self-check-report.txt:
	Add new test input file.
	* tests/data/test-diff-pkg/wireshark/wireshark-cli-3.4.9-1.fc36.x86_64.rpm:
	Likewise.
	* tests/data/test-diff-pkg/wireshark/wireshark-cli-debuginfo-3.4.9-1.fc36.x86_64.rpm:
	Likewise.
	* tests/test-diff-pkg.cc (in_out_specs): Add these new test input
	files to this test harness.
	* tests/data/test-read-dwarf/PR25007-sdhci.ko.abi: Adjust.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to master.
---
 src/abg-dwarf-reader.cc                       |   3 ++-
 src/abg-reader.cc                             |   6 ++---
 tests/data/Makefile.am                        |   3 +++
 ...-3.4.9-1.fc36.x86_64-self-check-report.txt |  21 ++++++++++++++++++
 .../wireshark-cli-3.4.9-1.fc36.x86_64.rpm     | Bin 0 -> 21382553 bytes
 ...hark-cli-debuginfo-3.4.9-1.fc36.x86_64.rpm | Bin 0 -> 39197386 bytes
 .../data/test-read-dwarf/PR25007-sdhci.ko.abi |   2 +-
 tests/test-diff-pkg.cc                        |  12 ++++++++++
 8 files changed, 42 insertions(+), 5 deletions(-)
 create mode 100644 tests/data/test-diff-pkg/wireshark/wireshark-cli-3.4.9-1.fc36.x86_64-self-check-report.txt
 create mode 100644 tests/data/test-diff-pkg/wireshark/wireshark-cli-3.4.9-1.fc36.x86_64.rpm
 create mode 100644 tests/data/test-diff-pkg/wireshark/wireshark-cli-debuginfo-3.4.9-1.fc36.x86_64.rpm


The patch is too big to attach to this email.  You can browse its
content at https://sourceware.org/git/?p=libabigail.git;a=commit;h=991283269ea8eb9bf9b1d1f460164c222f60e888.

Cheers,

-- 
		Dodji


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-18  9:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-18  9:00 [PATCH, applied] Bug 28364 - libwiretap fails self comparison Dodji Seketeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).