Closed as not planned
Description
Code
pub fn main() {
struct RecursiveDrop;
impl Drop for RecursiveDrop {
fn drop(&mut self) {
let _ = RecursiveDrop;
}
}
thread_local!(static LOCAL: RecursiveDrop = const { RecursiveDrop });
LOCAL.with(|_| {});
}
Current output
Segmentation fault (core dumped)
Desired output
thread 'main' has overflowed its stack
fatal runtime error: stack overflow
Aborted (core dumped)
Rationale and extra context
This should encounter a guard page and produce the expected diagnostic, but it does not.
rustc --version --verbose
:
rustc 1.70.0-nightly (44f518058 2023-03-20)
binary: rustc
commit-hash: 44f5180584404d18058cbbf224c55255db4fdcbb
commit-date: 2023-03-20
host: x86_64-unknown-linux-gnu
release: 1.70.0-nightly
LLVM version: 15.0.7