-
Notifications
You must be signed in to change notification settings - Fork 13.3k
miri engine: keep around some information for dead allocations #54254
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
Conversation
…it to make sure a dangling ptr aligned and non-NULL
r? @davidtwco (rust_highfive has picked a reviewer for you, use r? to override) |
@bors try for perf |
miri engine: keep around some information for dead allocations We use it to make sure a dangling ptr is aligned and non-NULL. This makes some code pass that should pass (writing a ZST to a properly aligned dangling pointer), and makes some code fail that should fail (writing a ZST to a pointer obtained via pointer arithmetic from a real location, but ouf-of-bounds -- that pointer could be NULL, so we cannot allow writing to it). CTFE does not allow these operations; tests are added to miri with rust-lang/miri#453.
☀️ Test successful - status-travis |
@rust-timer build 6f153da |
Success: Queued 6f153da with parent cba0fdf, comparison URL. |
This isn't a part of the compiler I'm particularly familiar with, so if there's someone you'd normally request a review from then feel free to That said, this looks good to me. So happy to r=me when ready (after rust-timer results or whatever). |
@bors r+ |
📌 Commit f3a76a1 has been approved by |
miri engine: keep around some information for dead allocations We use it to test if a dangling ptr is aligned and non-NULL. This makes some code pass that should pass (writing a ZST to a properly aligned dangling pointer), and makes some code fail that should fail (writing a ZST to a pointer obtained via pointer arithmetic from a real location, but ouf-of-bounds -- that pointer could be NULL, so we cannot allow writing to it). CTFE does not allow these operations; tests are added to miri with rust-lang/miri#453.
☀️ Test successful - status-appveyor, status-travis |
We use it to test if a dangling ptr is aligned and non-NULL. This makes some code pass that should pass (writing a ZST to a properly aligned dangling pointer), and makes some code fail that should fail (writing a ZST to a pointer obtained via pointer arithmetic from a real location, but ouf-of-bounds -- that pointer could be NULL, so we cannot allow writing to it).
CTFE does not allow these operations; tests are added to miri with rust-lang/miri#453.