public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: "gprocida+abigail at google dot com" <sourceware-bugzilla@sourceware.org>
To: libabigail@sourceware.org
Subject: [Bug default/26297] Possible misinterpretation of DW_AT_declaration via DW_AT_specification
Date: Fri, 24 Jul 2020 08:30:39 +0000	[thread overview]
Message-ID: <bug-26297-9487-rsW7fMI3yR@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-26297-9487@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=26297

--- Comment #3 from Giuliano Procida <gprocida+abigail at google dot com> ---
Hi Dodji.

I think there are a few places where DW_AT_specification is followed
explicitly, not just in search of particular attributes, but I'm not too
familiar with the DWARF reader. I agree that the change as-is is not too nice
and I'll see what I can do improve things. Thanks for the pointers.

Essentially, we need make sure we call die_is_declaration_only only on "root"
DIEs and add some logic to prevent the DW_AT_specification following in the
DW_AT_declaration case. The first part isn't yet clear to me, but the second
part is.

I'll also look into the distinction between DW_AT_specification and
DW_AT_abstract_origin.

This change also reduces kernel ABIs by about 30% which would be great if
definitely correct.

Given the large diff to tests, I felt I should do a bit more investigation.

To reduce the churn, I cherry-picked my changes for to switch changes to hash
type ids for annotate and DWARF reader tests and eventually ended up with...

LANG=C git show --stat=10000 | cut -f2 -d ' ' | grep abi$ | while read x; do
diff --label a/$x --label b/$x -u <(git show HEAD~1:$x | sed -E -e "s;
(mangled-name|elf-symbol-id|filepath|line|column|is-declaration-only|declared-inline)='[^']*';;g"
| sort -u) <(git show HEAD:$x | sed -E -e "s;
(mangled-name|elf-symbol-id|filepath|line|column|is-declaration-only|declared-inline)='[^']*';;g"
-e 's/858845f7/ccf88c3b/g' | sort -u); done | sed -e '/<!--/d' -e /parameter/d
| less

as a way of getting an overview of what, if anything, had been removed or added
by the change. Essentially, all the generated ABIs looked about OK.

On the other hand, there is a big diff diff for one of the abipkgdiff tests.

tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt

Here the one important thing appears to be "SpiceWatch::worker" changing type
between the two library versions. I've got as far as dumping ABI XML at the
point the two corpora are compared in abipkgdiff, before and after my change,
but I only see class SpiceWatch as declaration-only.

I've not gone as far as trying dwarfdump directly as yet.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2020-07-24  8:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23 18:27 [Bug default/26297] New: " gprocida+abigail at google dot com
2020-07-23 20:26 ` [Bug default/26297] " gprocida+abigail at google dot com
2020-07-23 23:05 ` mark at klomp dot org
2020-07-24  8:30 ` gprocida+abigail at google dot com [this message]
2020-07-24 12:45 ` gprocida+abigail at google dot com
2020-07-24 14:32 ` gprocida+abigail at google dot com
2020-08-06 16:48 ` dodji at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-26297-9487-rsW7fMI3yR@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=libabigail@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).