-
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
1.68.0 emits STATUS_ILLEGAL_INSTRUCTION on build #108978
Comments
That's... weird. |
CPU: AMD Phenom(tm) II X4 840 Processor 3.20 GHz |
Huh. I do know the CPU you are using pushes the edges of Windows 10 support. I would have thought it was still "in the clear", but only barely. I'd ask you to attach a debugger to find where the illegal instruction is invoked but I am not really familiar with the Windows debugging tools. |
Yes, previous version of Rust did work fine. I have dual booting computer with Linux also. 1.68 compiles correctly mentioned above code on Linux (and other projects also). |
So Windows fails, but Linux does not? |
Oh.This might be a consequence of a double-panic... |
I'm glad you have found something. Yes, this fails only on Windows on my system configuration. |
I have the same problem. CPU AMD Phenom II X6 1090T |
I have the same problem. I used the standalone installer. Core 2 Duo E6320 processor. However, when using "cargo build --release" everything compiles successfully. |
Hello, I'm having the same issue with AMD Phenom II X4 945 CPU and Windows 11 Pro, building using "cargo build --release" seems to work.
PS: The stable-i686-pc-windows-msvc toolchain seems to work both on debug and release mode. |
Could you try on nightly ? Especially the latest one, I wonder if it's linked to the ThinLTO miscompilation #109067. |
Also, if nightly doesn't help, can you try to use a debugger to see where it is faulting? You should be able to launch a debugger on rustc (the path can be shown via |
Alright, I installed nightly, by typing:
Then finally both debug and release mode works: 👍
I hope this help the people which having the same issue... |
Thanks! Could you try bisecting the fix using cargo-bisect-rustc? |
If bisecting is not possible/easy, checking with another nightly where we know the miscompilation is still present would otherwise be helpful: If we're correct, this should fail with the previous Thanks in advance. |
Hello, I installed caro-bisect-rustc using nightly x64 msvc and it found a regression...
The current status is cloning the rust repository, I'll let you know once it finish. |
|
cargo-bisect-rustc has finished! It's safe to remove all the targets and rust.git from my repository folder now? Regression in 22f247c searched nightlies: from nightly-2023-03-01 to nightly-2023-03-16 bisected with cargo-bisect-rustc v0.6.5Host triple: x86_64-pc-windows-msvc cargo bisect-rustc 2023-03-01 --end 2023-03-16 --regress success |
Thanks a bunch! It is indeed safe to remove all these. |
Not sure if this helps but issue does not exist with rustc 1.67.1 or 1.70.0-nighlty Only an issue with 1.68.0 and 1.69.0-beta.1 also I have access to 4 AMD systems and results are: FAILS AMD Phenom(tm) II X3 710 Processor 2.60 GHz |
but I will also repeat here that although it seems this is fixed in 1.70.0 the fix needs to backported to the beta and stable because it is not good for rust to have the latest version of Firefox not being able to be built with a lot of AMD processors using the latest stable version of rust. |
@mac198442 Sorry for the miscommunication. This was mentioned on #109067 but not here. A patch release should come out tomorrow. See https://blog.rust-lang.org/inside-rust/2023/03/20/1.68.1-prerelease.html and https://github.com/rust-lang/rust/blob/stable/RELEASES.md#version-1681-2023-03-23. |
OK just thought my experience was fails on 50% of AMD CPUs I had to test seemed widespread enough to need a backport. |
I can verify that my issue is resolved after updating to 1.68.1. Thanks for the good work. |
I will close the issue as it's fixed now. We can't really add a test for it right now. I will open a separate issue about running tests for dist builds, which should prevent this in the future. |
Couldn't build with cargo build.
I tried this code:
I expected to see this happen:
the program should compile fine.
Instead, this happened:
error: could not compile
nanny
Caused by:
process didn't exit successfully:
rustc --crate-name nanny --edition=2021 src\main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=203 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=5a2abc74c1c30893 --out-dir D:\Projects\nanny\target\debug\deps -C incremental=D:\Projekty\nanny\target\debug\incremental -L dependency=D:\Projects\nanny\target\debug\deps
(exit code: 0xc000001d, STATUS_ILLEGAL_INSTRUCTION)rustc --version --verbose
:Notes:
cargo check emits the same error.
cargo build --release works correctly.
Having Visual Studio 2022 v17.5.1 installed on my system.
The text was updated successfully, but these errors were encountered: