regression tests for pointer invalidation in core library slice methods #1816
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A fix for a pointer invalidation bug in
<[T]>::copy_within
has landed on the Rust master branch. This PR updates therust-version
file to the latest master commit hash and adds extra tests to the Miri test suite to ensure that regressions of this type of bug can be detected for various slice methods with the-Zmiri-track-raw-pointers
flag.I took the liberty of adding 2 extra
#![feature]
attributes at the top ofslices.rs
, since there already was one unstable feature. I hope this is okay 😄One thing I noticed when running the entire Miri test suite with
MIRIFLAGS="-Zmiri-track-raw-pointers" ./miri test
is that there are currently failing tests on the master branch:These failures were not fixed in this PR and already existed prior to this PR. I haven't investigated these yet, but am interested in helping out if possible!
Thanks!