Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive

Comments

fix issue 18981: SIGSEGV during backtrace when debug info is compressed#2214

Merged
wilzbach merged 1 commit intodlang:masterfrom
yshui:compressed-debug
Jun 19, 2018
Merged

fix issue 18981: SIGSEGV during backtrace when debug info is compressed#2214
wilzbach merged 1 commit intodlang:masterfrom
yshui:compressed-debug

Conversation

@yshui
Copy link
Contributor

@yshui yshui commented Jun 14, 2018

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?

@dlang-bot
Copy link
Contributor

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 verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the annotated coverage diff directly on GitHub with CodeCov's browser extension
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

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

Auto-close Bugzilla Severity Description
18981 enhancement SIGSEGV during backtrace when debug info is compressed

Testing this PR locally

If 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"

@dlang-bot dlang-bot added the Enhancement New functionality label Jun 14, 2018
@yshui yshui force-pushed the compressed-debug branch from 6238e5f to a14eee1 Compare June 14, 2018 10:15
@JinShil
Copy link
Contributor

JinShil commented Jun 15, 2018

Side note: seems I could not get line number no matter the debug info is compressed or not, is that a bug?

Probably https://issues.dlang.org/show_bug.cgi?id=18068

{
auto dbgSectionHeader = ElfSectionHeader(&file, dbgSectionIndex);
// we don't support compressed debug sections
static if (__traits(compiles, SHF_COMPRESSED))
Copy link
Contributor

Choose a reason for hiding this comment

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

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.
@yshui yshui force-pushed the compressed-debug branch from a14eee1 to 1892da7 Compare June 19, 2018 09:39
@yshui
Copy link
Contributor Author

yshui commented Jun 19, 2018

@wilzbach Fixed

@wilzbach wilzbach merged commit 69f598d into dlang:master Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Enhancement New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants