Open matthiaskrgr opened 11 months ago
This crashes since 871407a0341262d2a86703ca43b449d35fa5f236 / #115554 :thinking: cc @Kobzol
maybe another miscompilation?
This code required at least 8 MiB of stack size before, now it requires more than 8 MiB, but less than 16 MiB (RUST_MIN_STACK=16777216 cargo +871407a0341262d2a86703ca43b449d35fa5f236 build
works). I think that this is just a result of different optimization/inlining decisions stemming from the 1 CGU change.
This also causes some test code to no longer compile, rustc tests/ui/issues/issue-29466.rs -Cdebuginfo=2
will stack overflow now
I'm a bit worried that this will cause problems with crates that use large amounts of auto-generated code. :/
I wonder what to do about that though. I don't think that stack usage is a part of the Rust stability guarantees (?). And whether we want or not, it will eventually change organically, and make some programs stop compiling.
I think that this is actually showing us more bugs in rustc, where manual stack growth is missing, and these should be fixed.
We could also perhaps add some helper message to the stack overflow to guide people to use the env. var to increase stack size.
Code
from #93022
Meta
rustc --version --verbose
:Error output
Backtrace
``` error: rustc interrupted by SIGSEGV, printing backtrace /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-d069aac035ada932.so(+0x2c2ba26)[0x7f40e5c2ba26] /usr/lib/libc.so.6(+0x3e710)[0x7f40e2c3e710] /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-d069aac035ada932.so(_RNvMs_NtNtCscV0DyRuadRV_12rustc_middle2ty7contextNtB4_13CtxtInterners9intern_ty+0x11)[0x7f40e3e87631] /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-d069aac035ada932.so(+0xe7a797)[0x7f40e3e7a797] ### cycle encountered after 4 frames with period 6 /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-d069aac035ada932.so(+0xe891f6)[0x7f40e3e891f6] /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-d069aac035ada932.so(+0xe7b8a9)[0x7f40e3e7b8a9] /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-d069aac035ada932.so(+0xe891f6)[0x7f40e3e891f6] /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-d069aac035ada932.so(+0xe7b8a9)[0x7f40e3e7b8a9] /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-d069aac035ada932.so(+0xe891f6)[0x7f40e3e891f6] /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-d069aac035ada932.so(+0xe7b8a9)[0x7f40e3e7b8a9] ### recursed 42 times note: rustc unexpectedly overflowed its stack! this is a bug note: maximum backtrace depth reached, frames may have been lost note: we would appreciate a report at https://github.com/rust-lang/rust [1] 3482749 segmentation fault ~/.rustup/toolchains/master/bin/rustc treereduce.out ```