Skip to content
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

Bug: Spawn a thread with a empty loop, program will coredump when compile with optimizations #46076

Closed
biluohc opened this issue Nov 18, 2017 · 3 comments

Comments

@biluohc
Copy link

biluohc commented Nov 18, 2017

I found the bug because of i need a hand warmer.
My system is openSUSE 42.3(Linux 4.4.92 x86-64).
My rustc is 1.23.0-nightly and 1.21.0.
My code is follows:

fn main() {
    let handle = std::thread::spawn(||loop {});
    handle.join().unwrap()
}
@biluohc biluohc changed the title Bug: Spawn a thread with a empty loop, pragram will coredump when compile with optimizations Bug: Spawn a thread with a empty loop, program will coredump when compile with optimizations Nov 18, 2017
@hanna-kruppe
Copy link
Contributor

Thanks for the bug report! This bug is already tracked at #28728

@biluohc
Copy link
Author

biluohc commented Nov 18, 2017

Oh, Thanks you.

@bluss
Copy link
Member

bluss commented Nov 18, 2017

Note recent improvement #45920 that made such code into a memory safe albeit unpleasant crash. Closing since it's a duplicate of #28728.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants