-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Fix pointer provenance in <[T]>::copy_within #85610
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(rust-highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
May 23, 2021
SkiFire13
force-pushed
the
fix-copy-within-provenance
branch
2 times, most recently
from
May 23, 2021 19:52
5995594
to
8dfc24d
Compare
SkiFire13
force-pushed
the
fix-copy-within-provenance
branch
from
May 23, 2021 20:04
8dfc24d
to
d7341f3
Compare
📌 Commit d7341f3 has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
May 25, 2021
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
May 25, 2021
…e, r=oli-obk Fix pointer provenance in <[T]>::copy_within Previously the `self.as_mut_ptr()` invalidated the pointer created by the first `self.as_ptr()`. This also triggered miri when run with `-Zmiri-track-raw-pointers`
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
May 26, 2021
…e, r=oli-obk Fix pointer provenance in <[T]>::copy_within Previously the `self.as_mut_ptr()` invalidated the pointer created by the first `self.as_ptr()`. This also triggered miri when run with `-Zmiri-track-raw-pointers`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 26, 2021
Rollup of 12 pull requests Successful merges: - rust-lang#84048 (Avoid CJK legacy fonts in Windows) - rust-lang#85529 (doc: clarify Mutex::try_lock, etc. errors) - rust-lang#85590 (Fix bootstrap using host exe suffix for cargo) - rust-lang#85610 (Fix pointer provenance in <[T]>::copy_within) - rust-lang#85623 (Remove stray .stderr files) - rust-lang#85645 (Demote `ControlFlow::{from|into}_try` to `pub(crate)`) - rust-lang#85647 (Revert "Move llvm submodule updates to rustbuild") - rust-lang#85666 (Document shared_from_cow functions) - rust-lang#85668 (Fix tasklist example in rustdoc book.) - rust-lang#85672 (Move stability attribute for items under the `ip` feature) - rust-lang#85699 (Update books) - rust-lang#85701 (Update cargo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang/miri
that referenced
this pull request
Jun 3, 2021
regression tests for pointer invalidation in core library slice methods A fix for a pointer invalidation bug in `<[T]>::copy_within` has [landed](rust-lang/rust#85610) on the Rust master branch. This PR updates the `rust-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 of `slices.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: ``` failures: [ui] run-pass/align.rs [ui] run-pass/box.rs [ui] run-pass/concurrency/simple.rs [ui] run-pass/libc.rs [ui] run-pass/ptr_int_casts.rs [ui] run-pass/stacked-borrows/int-to-ptr.rs test result: FAILED. 199 passed; 6 failed; 1 ignored; 0 measured; 0 filtered out; finished in 12.95s ``` 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!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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.
Previously the
self.as_mut_ptr()
invalidated the pointer created by the firstself.as_ptr()
. This also triggered miri when run with-Zmiri-track-raw-pointers