-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
rustc segfaults when printing a backtrace for ICEs when debug=true is set #69151
Copy link
Copy link
Closed
Labels
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)C-bugCategory: This is a bug.Category: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)C-bugCategory: This is a bug.Category: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
When
debug=trueis set inconfig.toml,my machine generates alibrustc_driver.sowith a size of 2.2 GB, of which 2.1 GB is debuginfo. This ends up triggering ianlancetaylor/libbacktrace#32. Sincebacktrace-rsignores errors fromlibbacktrace, we continue trying to print the backtrace, which leads to a segfaut since thestrtabhas been freed due to thelibbacktraceerror.There are a couple of ways that we can address this:
libbacktracebug - I think this should be fairly straightforward, but I haven't attempted it yet.backtrace-rs'sgimlibackend - however, I don't think it's feature-complete atm.It would probably also be a good idea to investigate why 2.1 GB of debuginfo is getting generated - this seems really excessive.