-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
thread::spawn with function with no return result type causes SIGSEGV #39432
Comments
This is probably #28728. |
It is not.
still sigsegvs. The issue here is the |
More minimal:
|
This is due to this causing UB: #![feature(never_type)]
fn main() {
unsafe {
let a = std::mem::uninitialized::<!>();
}
} I vaguely remember there being an issue for that but I can't recall where. The precise call to this function happens here. |
This is technically not a regression apparently because this was rejected in 1.11.0 and just started faulting in 1.12.0: fn worker() -> ! {
panic!()
}
fn main() {
std::panic::catch_unwind(worker);
} |
Could you fix this by changing |
…r=alexcrichton Change std::panicking::try::Data into a union No longer potentially call `mem::uninitialized::<!>()` Fixes rust-lang#39432
Messages are never printed, the program just crashes.
This only happens in release mode.
What I did?
Ran following program in release mode.
What was expected?
Flood of "Printing messages" messages.
What happened instead.
SIGSEGV
Meta
This was confirmed to happen on stable (on IRC and in playpen), however I don't have stable installed.
The text was updated successfully, but these errors were encountered: