[illumos] stack exhaustion doesn't print "thread has overflowed its stack" messages #128568
Closed
Description
opened on Aug 2, 2024
I tried this code:
fn recurse(remaining: usize) {
if remaining > 0 {
recurse(remaining - 1);
}
}
recurse(1048576);
Also reproducible with this example program: https://github.com/sunshowers/stack-exhaust-test, by running cargo run
.
I expected to see this happen: Similar to Linux:
thread 'main' has overflowed its stack
fatal runtime error: stack overflow
Instead, this happened:
zsh: segmentation fault (core dumped) cargo run
Meta
rustc --version --verbose
:
rustc 1.80.0 (051478957 2024-07-21)
binary: rustc
commit-hash: 051478957371ee0084a7c0913941d2a8c4757bb9
commit-date: 2024-07-21
host: x86_64-unknown-illumos
release: 1.80.0
LLVM version: 18.1.7
Also reproduces with:
rustc 1.82.0-nightly (7120fdac7 2024-07-25)
binary: rustc
commit-hash: 7120fdac7a6e55a5e4b606256042890b36067052
commit-date: 2024-07-25
host: x86_64-unknown-illumos
release: 1.82.0-nightly
LLVM version: 18.1.7
Backtrace
(there's no backtrace, which I believe is expected in this situation)
% RUST_BACKTRACE=1 cargo +nightly run
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.04s
Running `target/debug/stack-exhaust-test`
running with use_stacker = No, new_thread = false, make_large_local = false
zsh: segmentation fault (core dumped) RUST_BACKTRACE=1 cargo +nightly run
Activity