rustc segfault (on ridiculous unlikely code) #102248
Labels
C-bug
Category: This is a bug.
I-crash
Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
rustc seems to segfault on my machine with this code. It's admittedly very ridiculous, so maybe this is a complete non-issue, but I'd expect it to pop up anything fancier than a raw unclear spam of what looks like a stack trace and then segfaulting.
The code and the compiler outputs are too large for GitHub's issue body 65536 character limit, so here it is as a gist: https://gist.github.com/Architector4/a862e017ac291649e9911652c28336f9#file-unitblock-rs
The code has unnecessary
println!
statements, but they don't seem to affect the error.Effectively, this code can be reproduced by taking this line:
{X}()
and recursively putting it into itself at X a few thousand times, at some point replacing it with nothing instead.Version
Checked with both stable and nightly versions.
rustc stable version (from
rustup
on Arch Linux):rustc nightly version (from
rustup
on Arch Linux):Output
Stable compiler output: https://gist.github.com/Architector4/a862e017ac291649e9911652c28336f9#file-rustc-stable-crash-log
Nightly compiler output: https://gist.github.com/Architector4/a862e017ac291649e9911652c28336f9#file-rustc-nightly-crash-log
There does not appear to be any change in the output from setting
RUST_BACKTRACE=1
in environment.The text was updated successfully, but these errors were encountered: