[Bug default/26297] Possible misinterpretation of DW_AT_declaration via DW_AT_specification
gprocida+abigail at google dot com
sourceware-bugzilla@sourceware.org
Fri Jul 24 08:30:39 GMT 2020
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.
More information about the Libabigail
mailing list