public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/31349] New: backtrace fails to look beyond null pointer when resolving stack (x86_64)
@ 2024-02-07 1:04 daniel at mariadb dot org
2024-02-07 8:43 ` [Bug libc/31349] " fweimer at redhat dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: daniel at mariadb dot org @ 2024-02-07 1:04 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31349
Bug ID: 31349
Summary: backtrace fails to look beyond null pointer when
resolving stack (x86_64)
Product: glibc
Version: 2.38
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: daniel at mariadb dot org
CC: drepper.fsp at gmail dot com
Target Milestone: ---
Created attachment 15352
--> https://sourceware.org/bugzilla/attachment.cgi?id=15352&action=edit
bt.c
Using backtrace in a signal hander, a null pointer dereference is a typical
cause.
Backtrace stops at the null pointer and fails to show information of the higher
stack that caused it.
$ gcc -g -o /tmp/bt /tmp/bt.c
$ /tmp/bt
Obtained 2 stack frames.
/tmp/bt() [0x4011a2]
/lib64/libc.so.6(+0x3e9a0) [0x7f98f2b759a0]
Expected results closer to what gdb does:
$ gdb /tmp/bt
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x0000000000401235 in dummy_function () at /tmp/bt.c:35
#2 0x0000000000401250 in main () at /tmp/bt.c:42
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libc/31349] backtrace fails to look beyond null pointer when resolving stack (x86_64)
2024-02-07 1:04 [Bug libc/31349] New: backtrace fails to look beyond null pointer when resolving stack (x86_64) daniel at mariadb dot org
@ 2024-02-07 8:43 ` fweimer at redhat dot com
2024-02-07 8:58 ` daniel at mariadb dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: fweimer at redhat dot com @ 2024-02-07 8:43 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31349
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2024-02-07
CC| |fweimer at redhat dot com
Status|UNCONFIRMED |WAITING
Ever confirmed|0 |1
--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
The summary does not accurately describe what is happening here, I think.
Is your concern that the frame containing dummy_function is skipped?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libc/31349] backtrace fails to look beyond null pointer when resolving stack (x86_64)
2024-02-07 1:04 [Bug libc/31349] New: backtrace fails to look beyond null pointer when resolving stack (x86_64) daniel at mariadb dot org
2024-02-07 8:43 ` [Bug libc/31349] " fweimer at redhat dot com
@ 2024-02-07 8:58 ` daniel at mariadb dot org
2024-02-07 10:06 ` schwab@linux-m68k.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: daniel at mariadb dot org @ 2024-02-07 8:58 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31349
--- Comment #2 from daniel at mariadb dot org <daniel at mariadb dot org> ---
Right, so the gdb has it intercepted before the signal hander.
The backtrace has the signal handler address and I assume jump point in libc
reflecting the signal hander invokation by the kernel(?).
But yes, I would expect the 0x00000 and dummy_function in the frames returned
by backtrace as they form part of the call stack.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libc/31349] backtrace fails to look beyond null pointer when resolving stack (x86_64)
2024-02-07 1:04 [Bug libc/31349] New: backtrace fails to look beyond null pointer when resolving stack (x86_64) daniel at mariadb dot org
2024-02-07 8:43 ` [Bug libc/31349] " fweimer at redhat dot com
2024-02-07 8:58 ` daniel at mariadb dot org
@ 2024-02-07 10:06 ` schwab@linux-m68k.org
2024-02-07 10:18 ` schwab@linux-m68k.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: schwab@linux-m68k.org @ 2024-02-07 10:06 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31349
--- Comment #3 from Andreas Schwab <schwab@linux-m68k.org> ---
Note that the backtrace is actually produced by _Unwind_Backtrace in libgcc, so
this needs to be reported to gcc.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libc/31349] backtrace fails to look beyond null pointer when resolving stack (x86_64)
2024-02-07 1:04 [Bug libc/31349] New: backtrace fails to look beyond null pointer when resolving stack (x86_64) daniel at mariadb dot org
` (2 preceding siblings ...)
2024-02-07 10:06 ` schwab@linux-m68k.org
@ 2024-02-07 10:18 ` schwab@linux-m68k.org
2024-02-07 10:46 ` fweimer at redhat dot com
2024-02-07 10:54 ` schwab@linux-m68k.org
5 siblings, 0 replies; 7+ messages in thread
From: schwab@linux-m68k.org @ 2024-02-07 10:18 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31349
--- Comment #4 from Andreas Schwab <schwab@linux-m68k.org> ---
gdb has an outside view of the situation, access to extra debug information,
and can construct artificial frames that the pure unwind info does not
describe.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libc/31349] backtrace fails to look beyond null pointer when resolving stack (x86_64)
2024-02-07 1:04 [Bug libc/31349] New: backtrace fails to look beyond null pointer when resolving stack (x86_64) daniel at mariadb dot org
` (3 preceding siblings ...)
2024-02-07 10:18 ` schwab@linux-m68k.org
@ 2024-02-07 10:46 ` fweimer at redhat dot com
2024-02-07 10:54 ` schwab@linux-m68k.org
5 siblings, 0 replies; 7+ messages in thread
From: fweimer at redhat dot com @ 2024-02-07 10:46 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31349
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |MOVED
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=113803
Status|WAITING |RESOLVED
--- Comment #5 from Florian Weimer <fweimer at redhat dot com> ---
I was confused, the summary is accurate. I've filed a GCC bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113803
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libc/31349] backtrace fails to look beyond null pointer when resolving stack (x86_64)
2024-02-07 1:04 [Bug libc/31349] New: backtrace fails to look beyond null pointer when resolving stack (x86_64) daniel at mariadb dot org
` (4 preceding siblings ...)
2024-02-07 10:46 ` fweimer at redhat dot com
@ 2024-02-07 10:54 ` schwab@linux-m68k.org
5 siblings, 0 replies; 7+ messages in thread
From: schwab@linux-m68k.org @ 2024-02-07 10:54 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31349
--- Comment #6 from Andreas Schwab <schwab@linux-m68k.org> ---
0x7f98f2b759a0 is the signal trampoline (__restore_rt), but _Unwind_Backtrace
cannot unwind through it.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-02-07 10:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-07 1:04 [Bug libc/31349] New: backtrace fails to look beyond null pointer when resolving stack (x86_64) daniel at mariadb dot org
2024-02-07 8:43 ` [Bug libc/31349] " fweimer at redhat dot com
2024-02-07 8:58 ` daniel at mariadb dot org
2024-02-07 10:06 ` schwab@linux-m68k.org
2024-02-07 10:18 ` schwab@linux-m68k.org
2024-02-07 10:46 ` fweimer at redhat dot com
2024-02-07 10:54 ` schwab@linux-m68k.org
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).