-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Miri: fix error on dangling pointer inbounds offset #114333
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
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri The Miri subtree was changed cc @rust-lang/miri Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
also simplify the in-bounds checking in Miri's borrow trackers
6d016a3
to
8496292
Compare
--> $DIR/dangling_pointer_offset.rs:LL:CC | ||
| | ||
LL | let x = unsafe { p.offset(42) }; | ||
| ^^^^^^^^^^^^ out-of-bounds pointer arithmetic: ALLOC has been freed, so this pointer is dangling |
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.
This is the key change, previously this talked about "pointer to alloc859 was dereferenced after this allocation got freed"
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (64ad036): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 648.769s -> 647.763s (-0.16%) |
We used to claim that the pointer was "dereferenced", but that is just not true.
Can be reviewed commit-by-commit. The first commit is an unrelated rename that didn't seem worth splitting into its own PR.
r? @oli-obk