-
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
HashMap executes UB on aarch64_be-unknown-linux-gnu_ilp32 #116880
Comments
Miri reports UB with the target in question:
(sorry for reflexively blaming LLVM, it didn't deserve that) |
The root cause is that the stdarch SIMD intrinsics are broken on big-endian targets. For now I've disabled the use of NEON in hashbrown on big-endian ARM: rust-lang/hashbrown#475 We should probably disable/de-stabilize the NEON intrinsics on big-endian targets. They are currently all producing incorrect results. |
All of them, or specifically for ARM? (Not sure if we have stdarch support for any other big-endian target.) Is there an issue tracking that and explaining in a bit more detail how they are broken? |
This only applies to arm & aarch64 targets. Here is the issue in stdarch: rust-lang/stdarch#1484 |
Miri doesn't support the NEON SIMD intrinsics though. So if Miri reports UB then it seems there are other problems as well? |
Some are implemented using the same |
It's a combination of a few things:
|
Ah so I guess what happens is that Miri correctly implements the portable SIMD intrinsics, but stdarch implements the NEON intrinsics on top of them and it's doing that incorrectly? Miri and codegen/LLVM are fine?
|
Yes, that's my understanding. |
Update hashbrown to 0.14.2 Fixes rust-lang#116880
…ulacrum Update hashbrown to 0.14.2 Fixes rust-lang#116880
I tried this code:
I expected to see this happen: map = {1: "a"}
Instead, error happened:
Sometimes it causes Segmentation fault:
Meta
rustc --version --verbose
:compilation command
:.cargo/config
:Backtrace
The text was updated successfully, but these errors were encountered: