Skip to content

fix(native): resolve symbol names for crashed thread on Linux#1764

Merged
jpnurmi merged 6 commits into
masterfrom
jpnurmi/feat/native/elf-symbols
May 28, 2026
Merged

fix(native): resolve symbol names for crashed thread on Linux#1764
jpnurmi merged 6 commits into
masterfrom
jpnurmi/feat/native/elf-symbols

Conversation

@jpnurmi
Copy link
Copy Markdown
Collaborator

@jpnurmi jpnurmi commented May 28, 2026

Resolve function names from on-disk ELF symbol tables (.dynsym/.symtab) for the crashed thread's stacktrace in the crash daemon. The daemon already had module paths and base addresses from ctx->modules[], so symbol resolution is a straightforward ELF section header parse + symbol table lookup — no ptrace needed (which is not safe for the crashed thread).

Previously, the pre-captured backtrace (DWARF-based, signal-frame-aware) from the signal handler was preferred over remote unwinding for the crashed thread, but only set instruction_addr and module package — never function names. The FP-walking and single-IP fallback paths had the same gap.

image

jpnurmi added 2 commits May 28, 2026 10:34
Resolve function names from on-disk ELF symbol tables (.dynsym/.symtab)
for the crashed thread's stacktrace in the crash daemon. The daemon
already had module paths and base addresses from ctx->modules[], so
symbol resolution is a straightforward ELF section header parse + symbol
table lookup — no ptrace needed.

Previously, the pre-captured backtrace (DWARF-based, signal-frame-aware)
from the signal handler was preferred over remote unwinding for the
crashed thread, but only set instruction_addr and module package — never
function names. The FP-walking and single-IP fallback paths had the same
gap.
Comment thread src/backends/native/sentry_crash_daemon.c
Comment thread src/backends/native/sentry_crash_daemon.c
Comment thread src/backends/native/sentry_crash_daemon.c
Comment thread src/backends/native/sentry_crash_daemon.c
Comment thread src/backends/native/sentry_crash_daemon.c Outdated
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4855289. Configure here.

Comment thread src/backends/native/sentry_crash_daemon.c Outdated
@jpnurmi jpnurmi requested a review from mujacica May 28, 2026 09:43
@jpnurmi jpnurmi merged commit d561d8f into master May 28, 2026
63 checks passed
@jpnurmi jpnurmi deleted the jpnurmi/feat/native/elf-symbols branch May 28, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants