-
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
ICE: assertion failed: base.layout.ty.is_simd() #94382
Comments
FWIW, we typically do not consider ICEs due to incorrectly used intrinsics as bugs. That is an infinite rabbit hole and it's not worth it, given that intrinsics will never be stabilized. That said, if it helps people working on the standard library, and if having a nicer error is easy to do without extra maintenance overhead, PRs emitting nicer errors are still usually accepted. @matthiaskrgr I wonder in which situation you encountered this problem? |
I was playing around and generating rust code using markov chains and filtering out the compiler crashes 😁 |
Yea, if your generated code, contains feature gates like That said, we should totally talk. I want to start generating some random programs, too, but instead of finding crashes I want to find UB in safe code. |
To be fair, the ICE error message explicitly tells people to report these as bugs, so we shouldn't be surprised about reports like this. ;) |
Note; while rustc rejects the code with an error // build-fail
#![feature(platform_intrinsics)]
extern "platform-intrinsic" {
fn simd_add<T>(a: T, b: T) -> T;
}
fn main() {
unsafe { simd_add(0, 1); } //~ ERROR E0511
} miri will also show the ICE:
|
We could hide the issue comment if no_core is enabled |
Oh this makes me wonder if it would be worthwhile to have something like |
Yeah, rustc cares a bit more about giving nice errors than Miri does. They have more people working on this, too. ;) But we shouldn't duplicate all that error logic from rustc, instead we should move it to some place where it works regardless of the codegen backend. |
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: