-
Notifications
You must be signed in to change notification settings - Fork 367
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
Stacked Borrows: alignment does not matter #1348
Conversation
// updated using "self.0 = ..." (can happen in Box::from_raw); see miri#1050. | ||
let place = this.mplace_access_checked(place)?; | ||
// updated using "self.0 = ..." (can happen in Box::from_raw) so we cannot ICE; see miri#1050. | ||
let place = this.mplace_access_checked(place, Some(Align::from_bytes(1).unwrap()))?; |
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.
you could also just mutate the layout here before passing the place to mplace_access_checked
instead of having to change the API.
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.
You mean, change the value of place.layout.align
? That feels even more hacky than the API extension...
Also that could trigger the assertion in mplace_access_checked
.
Miri: mplace_access_checked: offer option to force different alignment on place Required to solve rust-lang/miri#1339 in rust-lang/miri#1348. r? @oli-obk
436e492
to
7259d61
Compare
7259d61
to
4b9abda
Compare
@bors r+ |
📌 Commit 4b9abda has been approved by |
☀️ Test successful - checks-travis, status-appveyor |
Fixes #1339
Requires rust-lang/rust#71280