-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
rust-1.75.0 fails to compile with ICE on aarch64 and various ppc arches with LTO enabled - error: could not compile memchr #121124
Comments
Honestly this looks like the const-eval interpreter has been miscompiled. That index is The other user is reporting a smattering of errors, but like the above ICE, they're all from a misbehaving const eval interpreter. |
By the way, rustc is not faster when compiled with fat LTO than with thin LTO (which, unlike the fat LTO config, is well tested, as we distribute our release artifacts with that). #103453 |
Other people have hit miscompilations in the past too with fat LTO compiling rustc (#110564 |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-critical |
Is it possible to verify whether this still happens on nightly (which has LLVM 18)? |
cc: @bowlofeggs |
I posted on our ticket to ask if anyone can check. I don't personally have affected hardware to check myself. |
We've had a few issues with lto on, and it isn't on by default generally among Gentoo packages, so this commit flips it to be off by default. Additionally, in an upstream ticket[0] it was suggested to use thin LTO rather than fat LTO, so this commit makes that adjustment as well. [0] rust-lang/rust#121124 Bug: https://bugs.gentoo.org/924301 Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
We've had a few issues with lto on, and it isn't on by default generally among Gentoo packages, so this commit flips it to be off by default. Additionally, in an upstream ticket[0] it was suggested to use thin LTO rather than fat LTO, so this commit makes that adjustment as well. [0] rust-lang/rust#121124 [sam: Note that there's a risk of miscompilations with non-thin LTO, per the upstream bug(s).] Bug: https://bugs.gentoo.org/924301 Signed-off-by: Randy Barlow <randy@electronsweatshop.com> Closes: #35796 Signed-off-by: Sam James <sam@gentoo.org>
We switched to using thin LTO in some testing builds recently, and a user reported to me that thin LTO fails on RISC-V, where fat LTO succeeds. |
Can you link to an issue report? Or provide any details? Or a reproducer of the problem? |
This is from the user reporting issues with thin LTO on RISC-V:
They also mentioned that they are using the system-provided LLVM rather than the rust provided one, and they indicated that they think that might be related. |
I think I might be able to reproduce some related problems here on my Mac M1 (now that I have compiled the compiler with LTO=fat turned on). In particular: I have not seen the bootstrap itself fail (at least not when doing I have to go AFK for a bit but I'll poke at this more later. |
Greetings! A Gentoo user reported a build failure with Rust 1.75.0 on
aarch64
when building withlto = "fat"
inconfig.toml
. Other users have found that LTO also causes build failures on ppc, ppc64, and ppc64le.Meta
This is Rust 1.75.0, built on the end users' machines.
Error output
Backtrace
This is the ice file that the output requested:
Users have found disabling
lto
in the buildconfig.toml
allows them to build Rust successfullyThe text was updated successfully, but these errors were encountered: