-
Notifications
You must be signed in to change notification settings - Fork 348
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
Miri incorrectly rejects pointer-as-bytes access with cttz
#916
Comments
Whether such code is legal in LLVM is still up for debate (transmuting, instead of casting, between pointers and integers is a subtle topic). But until that is resolved, Miri should probably accept such code, I agree. It already does in other circumstances. This is a missing |
I have a rustc ranch that fixes it, indeed just a force_bits |
Ensure miri can do bit ops on pointer values r? @RalfJung Fixes rust-lang/miri#916
Ensure miri can do bit ops on pointer values r? @RalfJung Fixes rust-lang/miri#916
For the fix to be shipped via rustup, we need to solve rust-lang/rust#63843 first. |
Expected behavior: Miri allows me to interpret a pointer as a
usize
, so that I may callcttz
on it to see how aligned it is.Actual behavior: it does not.
Output of
rustup show
:Rust minimal test case:
Miri output:
The text was updated successfully, but these errors were encountered: