rustc segfaults when printing a backtrace for ICEs when debug=true is set #69151
Labels
A-debuginfo
Area: Debugging information in compiled programs (DWARF, PDB, etc.)
C-bug
Category: This is a bug.
I-crash
Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
When
debug=true
is set inconfig.toml,
my machine generates alibrustc_driver.so
with a size of 2.2 GB, of which 2.1 GB is debuginfo. This ends up triggering ianlancetaylor/libbacktrace#32. Sincebacktrace-rs
ignores errors fromlibbacktrace
, we continue trying to print the backtrace, which leads to a segfaut since thestrtab
has been freed due to thelibbacktrace
error.There are a couple of ways that we can address this:
libbacktrace
bug - I think this should be fairly straightforward, but I haven't attempted it yet.backtrace-rs
'sgimli
backend - 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.
The text was updated successfully, but these errors were encountered: