Skip to content
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 liballoc test suite for Miri #76662

Merged
merged 3 commits into from
Sep 16, 2020
Merged

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Sep 13, 2020

Mostly, fix the regression introduced by #75207 that caused slices (i.e., references) to be created to invalid memory or memory that has aliasing pointers that we want to keep valid. @dylni this changes the type of check_range to only require the length, not the full reference to the slice, which indeed is all the information this function requires.

Also reduce the size of a test introduced in #70793 to make it not take 3 minutes in Miri.

This makes https://github.com/RalfJung/miri-test-libstd work again.

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 13, 2020
library/alloc/tests/vec.rs Outdated Show resolved Hide resolved
@Mark-Simulacrum
Copy link
Member

r=me with CI passing.

@RalfJung
Copy link
Member Author

@bors r=Mark-Simulacrum rollup

@bors
Copy link
Contributor

bors commented Sep 13, 2020

📌 Commit bb41740 has been approved by Mark-Simulacrum

@bors 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 Sep 13, 2020
RalfJung added a commit to RalfJung/rust that referenced this pull request Sep 13, 2020
…lacrum

Fix liballoc test suite for Miri

Mostly, fix the regression introduced by rust-lang#75207 that caused slices (i.e., references) to be created to invalid memory or memory that has aliasing pointers that we want to keep valid. @dylni  this changes the type of `check_range` to only require the length, not the full reference to the slice, which indeed is all the information this function requires.

Also reduce the size of a test introduced in rust-lang#70793 to make it not take 3 minutes in Miri.

This makes https://github.com/RalfJung/miri-test-libstd work again.
RalfJung added a commit to RalfJung/rust that referenced this pull request Sep 13, 2020
…lacrum

Fix liballoc test suite for Miri

Mostly, fix the regression introduced by rust-lang#75207 that caused slices (i.e., references) to be created to invalid memory or memory that has aliasing pointers that we want to keep valid. @dylni  this changes the type of `check_range` to only require the length, not the full reference to the slice, which indeed is all the information this function requires.

Also reduce the size of a test introduced in rust-lang#70793 to make it not take 3 minutes in Miri.

This makes https://github.com/RalfJung/miri-test-libstd work again.
@bors
Copy link
Contributor

bors commented Sep 15, 2020

☔ The latest upstream changes (presumably #76311) made this pull request unmergeable. Please resolve the merge conflicts.

Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 15, 2020
@RalfJung
Copy link
Member Author

@bors r=Mark-Simulacrum

@bors
Copy link
Contributor

bors commented Sep 16, 2020

📌 Commit 7d67546 has been approved by Mark-Simulacrum

@bors bors removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 16, 2020
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Sep 16, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 16, 2020
Rollup of 10 pull requests

Successful merges:

 - rust-lang#76056 (Add more info for Vec Drain doc)
 - rust-lang#76062 (Vec slice example fix style and show type elision)
 - rust-lang#76262 (Use inline(never) instead of cold)
 - rust-lang#76335 (Make all methods of `Duration` unstably const)
 - rust-lang#76366 (Add Arith Tests in Library)
 - rust-lang#76369 (Move Various str tests in library)
 - rust-lang#76534 (Add doc comments for From impls)
 - rust-lang#76622 (Update bootstrap readme)
 - rust-lang#76641 (Some cleanup changes and commenting)
 - rust-lang#76662 (Fix liballoc test suite for Miri)

Failed merges:

r? `@ghost`
@bors bors merged commit 9d0a265 into rust-lang:master Sep 16, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 16, 2020
@RalfJung RalfJung deleted the lib-test-miri branch September 16, 2020 11:52
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 18, 2020
…-bounds, r=KodrAus

Move `slice::check_range` to `RangeBounds`

Since this method doesn't take a slice anymore (rust-lang#76662), it makes more sense to define it on `RangeBounds`.

Questions:
- Should the new method be `assert_len` or `assert_length`?
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants