-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Fatal runtime error and illegal instruction when compiling with LTO #11683
Comments
A smaller example that also triggers the error: fn main() {
let (p, c) = Chan::<int>::new();
do spawn {
c.send(1);
}
println!("{}", p.recv());
} |
What system are you running on and can you provide the exact invocations of |
Reproduced on two (quite similar) i7-3770(K) systems. Both running an up-to-date Debian Sid. I just noticed that it doesn't fail if you don't pass Invocation that triggers the failure:
|
Well then. That's 6 hours of my life I'll never get back :) Not exactly the bug I was expecting to find... |
There's lots of fun rationale in the comments of the diff. Closes #11683
…flip1995 Deserialize `Msrv` directly in `Conf` Gives the error a span pointing to the invalid config value Also puts `Conf` itself in the `OnceLock` rather than just the `Msrv` for [the `register_late_mod_pass` work](rust-lang#116731) since it will be used from two different callbacks changelog: none
After reading http://thornydev.blogspot.co.uk/2014/01/chinese-whispers-in-rust.html I tried to compile the example code with -Z lto. The resulting binary crashes with a fatal runtime error.
Code:
Output without LTO:
Output with LTO:
Sometimes the error message is printed more than once.
The text was updated successfully, but these errors were encountered: