[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 12:45:06 GMT 2020


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

--- Comment #4 from Giuliano Procida <gprocida+abigail at google dot com> ---
Some progress.

It's possible and easy to update die_is_declaration only to not follow links.
This makes some difference.

For the rest, passing through some state is still needed. However, my first
attempt definitely contained something which blew up the
tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt
test. This may have been due to treating DW_AT_abstract_origin differently from
DW_AT_specification in one place.

I've rethought and reworked it. Instead of recording whether we have reached a
DIE via one or more links, I think it makes more sense to track the conjunction
of all the declaration-only states in a chain.

DIE1 --> DIE2 --> DIE3
decl     (no      decl
only      attr)   only

This should be treated as NOT declaration-only. Each time a link is followed,
it's either used for scope logic which doesn't care about this or there's a
recursive call to build_ir_node_from_die.

So, build_ir_node_from_die should take an is_declaration_only argument,
defaulted to true and (almost) immediately AND it with
die_is_declaration_only(die). This does leave much the same amount of plumbing
as before but it does make more logical sense.

WIP changes at https://github.com/myxoid/libabigail/commits/dwarf-follow-spec

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


More information about the Libabigail mailing list