When debug=true is set in config.toml, my machine generates a librustc_driver.so with a size of 2.2 GB, of which 2.1 GB is debuginfo. This ends up triggering ianlancetaylor/libbacktrace#32. Since backtrace-rs ignores errors from libbacktrace, we continue trying to print the backtrace, which leads to a segfaut since the strtab has been freed due to the libbacktrace error.
There are a couple of ways that we can address this:
- Fix the
libbacktrace bug - I think this should be fairly straightforward, but I haven't attempted it yet.
- Switch over to using
backtrace-rs's gimli 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.
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.