-
-
Notifications
You must be signed in to change notification settings - Fork 15k
rustc segfault (on ridiculous unlikely code) #102248
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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
rustupon Arch Linux):rustc nightly version (from
rustupon 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=1in environment.