In versions prior to 2022-06-27, compiling core for AVR in debug mode generates the following error:
error: ran out of registers during register allocation
This error isn't ideal, but it's not the subject of this bug report. In versions starting with 2022-06-27, rustc instead segfaults, with an error like this:
This doesn't necessarily happen all the time though. sometimes it errors with error: ran out of registers during register allocation like it should be doing, so it seems to be non-deterministic on some versions of rustc. This is why my bisection build script re-runs it 10 times to be sure it segfaults at least once. However, the commit directly before the failing commit returned error: ran out of registers during register allocation 10 times, and the failing commit segfaulted all 10 times, so maybe it's deterministic for the failing commit.
cargo build --release works just fine and does not generate either error.
code to reproduce at https://github.com/faithanalog/rustc-avr-bug-repro
searched nightlies: from nightly-2022-06-05 to nightly-2022-09-15 regressed nightly: nightly-2022-06-27 searched commit range: https://github.com/rust-lang/rust/compare/20a6f3a8a8ce5ae18d06b12cd7904bc5294ca753...c80c4b8fdcf3da69cd483e2fec172c9b1f95842c regressed commit: https://github.com/rust-lang/rust/commit/788ddedb0d88e40db9cd62b6163d5a471813044b
bisected with cargo-bisect-rustc v0.6.4
Host triple: x86_64-unknown-linux-gnu Reproduce with: ```bash cargo-bisect-rustc --with-src --start 2022-06-05 --end 2022-09-15 --script ./build.sh ```In versions prior to 2022-06-27, compiling
core
for AVR in debug mode generates the following error:This error isn't ideal, but it's not the subject of this bug report. In versions starting with 2022-06-27, rustc instead segfaults, with an error like this:
This doesn't necessarily happen all the time though. sometimes it errors with
error: ran out of registers during register allocation
like it should be doing, so it seems to be non-deterministic on some versions of rustc. This is why my bisection build script re-runs it 10 times to be sure it segfaults at least once. However, the commit directly before the failing commit returnederror: ran out of registers during register allocation
10 times, and the failing commit segfaulted all 10 times, so maybe it's deterministic for the failing commit.cargo build --release
works just fine and does not generate either error.