* [Bug libdw/29430] New: `dwarf_getscopes` fails after a8493c1
@ 2022-07-28 22:02 godlygeek at gmail dot com
2022-07-29 18:53 ` [Bug libdw/29430] " godlygeek at gmail dot com
0 siblings, 1 reply; 2+ messages in thread
From: godlygeek at gmail dot com @ 2022-07-28 22:02 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29430
Bug ID: 29430
Summary: `dwarf_getscopes` fails after a8493c1
Product: elfutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libdw
Assignee: unassigned at sourceware dot org
Reporter: godlygeek at gmail dot com
CC: elfutils-devel at sourceware dot org
Target Milestone: ---
Apologies, but I haven't yet succeeded in creating a self-contained reproducer
for this issue.
When calling `dwarf_getscopes` on a (PGO and LTO) binary (a Python interpreter
built with GCC 9.3.1 against glibc 2.12, which is a relatively old glibc
version), I'm seeing failures with elfutils 0.187 that I didn't see with
elfutils 0.179. We were able to bisect the problem down to commit a8493c1, and
we see that reverting that commit causes `dwarf_getscopes` to succeed even with
elfutils 0.187
That commit is:
libdw: Skip imported compiler_units in libdw_visit_scopes walking DIE tree
Some gcc -flto versions imported other top-level compile units,
skip those. Otherwise we'll visit various DIE trees multiple times.
Note in the testcase that with newer GCC versions function foo is
fully inlined and does appear only once (as declared, but not as
separate subprogram).
Signed-off-by: Mark Wielaard <mark@klomp.org>
Any idea why this might have broken PC resolution for us?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug libdw/29430] `dwarf_getscopes` fails after a8493c1
2022-07-28 22:02 [Bug libdw/29430] New: `dwarf_getscopes` fails after a8493c1 godlygeek at gmail dot com
@ 2022-07-29 18:53 ` godlygeek at gmail dot com
0 siblings, 0 replies; 2+ messages in thread
From: godlygeek at gmail dot com @ 2022-07-29 18:53 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29430
Matt Wozniski <godlygeek at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |NOTABUG
--- Comment #1 from Matt Wozniski <godlygeek at gmail dot com> ---
Well - nevermind. Our problem turned out not to be an issue with
`dwarf_getscopes` at all, but a bug in our unwinder that only occurred when
`dwarf_getscopes` finds 0 scopes. Our buggy code was working with elfutils
0.179 because `dwarf_getscopes` would erroneously return extra scopes due to
DIE trees being visited multiple times, and we'd ignore those scopes because
`dwarf_tag(scope) != DW_TAG_inlined_subroutine`, but our bug that triggers only
when 0 scopes are found wouldn't occur.
After `dwarf_getscopes` was fixed, it began returning 0 when it previously
hadn't, and our code failed to properly handle that case in a way that had
never been noticed.
Sorry for the false alarm!
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-29 18:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-28 22:02 [Bug libdw/29430] New: `dwarf_getscopes` fails after a8493c1 godlygeek at gmail dot com
2022-07-29 18:53 ` [Bug libdw/29430] " godlygeek at gmail dot com
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).