fix issue 18981: SIGSEGV during backtrace when debug info is compressed#2214
fix issue 18981: SIGSEGV during backtrace when debug info is compressed#2214wilzbach merged 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request and interest in making D better, @yshui! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + druntime#2214" |
|
src/rt/backtrace/elf.d
Outdated
| { | ||
| auto dbgSectionHeader = ElfSectionHeader(&file, dbgSectionIndex); | ||
| // we don't support compressed debug sections | ||
| static if (__traits(compiles, SHF_COMPRESSED)) |
There was a problem hiding this comment.
AFAICT there's no reason for this special casing here. FreeBSD and DragonflyBSD also use the same ELF format and thus imho it's better to add the SHF_COMPRESSED constant to the respective files.
Detect compressed debug line section, do not try to resolve line numbers if the debug info is compressed.
|
@wilzbach Fixed |
Detect compressed debug line section, do not try to resolve line numbers if
the debug info is compressed.
Side note: seems I could not get line number no matter the debug info is compressed or not, is that a bug?