-
Notifications
You must be signed in to change notification settings - Fork 58
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
Should drop_in_place
imply dereferencability?
#373
Comments
(I've checked and the LLVM IR we currently emit for this does not have UB) |
If the example had comments, not every reader would have to reverse engineer what the question is about. ;) I think @pcwalton also recently asked to treat the |
Treating |
By the way, https://doc.rust-lang.org/std/ptr/fn.drop_in_place.html#safety already says that |
That seems like a reasonable reading of the documentation. We'll still want to check how much of the ecosystem actually complies with this though (sorry, didn't get the branch up yesterday) |
Yeah, on the library API front we are probably good, we just haven't made this into language UB yet, at least not in Miri. |
Retag as FnEntry on `drop_in_place` This commit changes the mir drop shim to always retag its argument as if it were a `&mut`. cc rust-lang/unsafe-code-guidelines#373
Retag as FnEntry on `drop_in_place` This commit changes the mir drop shim to always retag its argument as if it were a `&mut`. cc rust-lang/unsafe-code-guidelines#373
The following code is currently DB as reported by Miri:
Should it be?
The text was updated successfully, but these errors were encountered: