From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4EC41385DC0A; Fri, 24 Jul 2020 08:30:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4EC41385DC0A From: "gprocida+abigail at google dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: libabigail X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gprocida+abigail at google dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dodji at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jul 2020 08:30:39 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26297 --- Comment #3 from Giuliano Procida -= -- 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 ni= ce 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 "roo= t" 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 ha= sh type ids for annotate and DWARF reader tests and eventually ended up with... LANG=3DC git show --stat=3D10000 | 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|declar= ed-inline)=3D'[^']*';;g" | sort -u) <(git show HEAD:$x | sed -E -e "s; (mangled-name|elf-symbol-id|filepath|line|column|is-declaration-only|declar= ed-inline)=3D'[^']*';;g" -e 's/858845f7/ccf88c3b/g' | sort -u); done | sed -e '/