-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Description
I recently rebased an old branch (branched off at 4007d4e) and afterwards found that the backtrace didn't contain any of the compiler (ignore the actual ICE, I'm sure I'll fix it once I stop trying to get backtraces back):
error: internal compiler error: src/librustc/traits/codegen/mod.rs:58: Encountered error `Unimplemented` selecting `Binder(<T as num::dec2flt::rawfp::RawFloat>)` during codegen
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:895:9
stack backtrace:
0: backtrace::backtrace::libunwind::trace
at /home/david/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
1: backtrace::backtrace::trace_unsynchronized
at /home/david/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
2: std::sys_common::backtrace::_print_fmt
at src/libstd/sys_common/backtrace.rs:77
3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
at src/libstd/sys_common/backtrace.rs:59
4: core::fmt::write
at src/libcore/fmt/mod.rs:1057
5: std::io::Write::write_fmt
at src/libstd/io/mod.rs:1426
6: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:62
7: std::sys_common::backtrace::print
at src/libstd/sys_common/backtrace.rs:49
8: std::panicking::default_hook::{{closure}}
at src/libstd/panicking.rs:195
9: std::panicking::default_hook
at src/libstd/panicking.rs:215
error: could not compile `core`.
You can find my config.toml
here. This is running on a NixOS host with an i7-8700. It isn't fixed by setting RUST_BACKTRACE
to 1
, full
or leaving it unset. I've also tried with and without the backtrace
option in config.toml
. I also tried invoking the compiler directly (original error was in compiling libcore
through x.py
after some of my changes).
I was able to bisect (results) the issue to a handful of commits:
I wasn't able to test any of these and be more specific because Cargo.lock
was in a broken state in these commits. On the last commit which failed, after printing the same limited backtrace as above (on a simple test case that compile errors and -Z treat-err-as-bug
), it printed the following:
8: std::panicking::default_hook::{{closure}}
at src/libstd/panicking.rs:193
9: std::panicking::default_hook
at src/libstd/panicking.rs:210
fish: “rustc +rust2-stage1 -Z treat-er…” terminated by signal SIGSEGV (Address boundary error)
cc @Aaron1011 @alexcrichton (authors of the above commits)