"SIGSEGV: invalid memory reference" when compiling with optimizations #127260
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
C-bug
Category: This is a bug.
I-crash
Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
llvm-fixed-upstream
Issue expected to be fixed by the next major LLVM upgrade, or backported fixes
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
I worked out this minimal reproducible example from some code I've been working on. Changing almost anything about this causes the compiler crash to go away, which probably makes it a little hard to figure out what's going on here. I've checked and performing a release build, or a debug build with an opt level >= 1 will cause the compiler to SIGSEGV. Clearing the target dir, switching between stable/nightly, reinstalling toolchains, updating my system etc. didn't have an effect.
Meta
Occurs in both Stable and Nightly.
rustc +stable --version --verbose
:rustc +nightly --version --verbose
:Error output
No backtrace was output.
Also attempted to enable LLVM assertions and saw no change in output.
Increasing stack size, as per advice, had no effect.
The text was updated successfully, but these errors were encountered: