-
Notifications
You must be signed in to change notification settings - Fork 13k
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 engine: add option to use force_int for alignment check #75592
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with comment nit
// We instead have to fall back to converting to an integer and checking | ||
// the "real" alignment. | ||
throw_ub!(AlignmentCheckFailed { has: alloc_align, required: align }); | ||
if M::force_int_for_alignment_check(&self.extra) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking we could make the hook do the check, but I guess that would lead to a lot of duplication in miri where we want to be able to choose between both options at runtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, also I'd rather have all the checking code in one place. This is critical code to get right.
@bors r=oli-obk |
📌 Commit 6da8503 has been approved by |
☀️ Test successful - checks-actions, checks-azure |
Tested on commit rust-lang/rust@8cdc94e. Direct link to PR: <rust-lang/rust#75592> 💔 miri on windows: test-pass → build-fail (cc @oli-obk @eddyb @RalfJung). 💔 miri on linux: test-pass → build-fail (cc @oli-obk @eddyb @RalfJung).
add option to use force_int for alignment check Fixes #1074. Depends on rust-lang/rust#75592.
add option to use force_int for alignment check Fixes #1074. Depends on rust-lang/rust#75592.
add option to use force_int for alignment check Fixes #1074. Depends on rust-lang/rust#75592.
add option to use force_int for alignment check Fixes #1074. Depends on rust-lang/rust#75592.
add option to use force_int for alignment check Fixes #1074. Depends on rust-lang/rust#75592.
add option to use force_int for alignment check Fixes #1074. Depends on rust-lang/rust#75592.
This is needed for rust-lang/miri#1074. The Miri-side patch is at rust-lang/miri#1513.
r? @oli-obk