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

update Miri #113151

Merged
merged 64 commits into from
Jun 29, 2023
Merged

update Miri #113151

merged 64 commits into from
Jun 29, 2023

Conversation

RalfJung
Copy link
Member

r? @ghost

beepster4096 and others added 30 commits June 2, 2023 15:34
- reorganize tests/ structure: {stacked,tree,both}_borrows
- UnsafeCell transmutation (the one that should fail, i.e. transmute &
  -> UnsafeCell then try to write)
- select TB pass tests from existing SB fail tests (and a version that
  fails TB)
- many fail tests now shared
    * extra test for TB that parent write invalidates child reads
    * buggy_* tests now shared
    * tests for deep retagging (pass_invalid_shr_*) now shared
    * extra TB test that shared references are read-only
    * aliasing_mut{1,2,3,4} adapted to fail both
    * extra TB test that write to raw parent invalidates shared children
    * mut_exclusive_violation2 now shared
    * issue-miri-1050-2 revisions fix
- deduplications
TB: more fail tests (mostly shared with SB)

Although it was not in the tests, `mem::transmute` works for `UnsafeCell -> &` as well.

Draft: will also introduce more test cases for cases that fail.
Draft: depends on the new error messages from rust-lang#2888
use as_os_str_bytes

Make use of the new operations recently added (tracking issue: rust-lang#111544). At least the "host OsStr to target bytes" direction now works even for non-utf-8 strings on all hosts!
Remove rustc-workspace-hack

The `rustc-workspace-hack` dependency was removed in rust-lang#109133 and should no longer be needed.
TB: improve error messages (distinguish between accesses and reborrows)

I don't remember where, but there was a complaint that while SB's error messages distinguish between "invalidated by an access" and "invalidated by a reborrow", TB's error messages do not.
Revert error in doc comment

Also punctuation
TB: `box_exclusive_violation1` moved to `both_borrows`

`box_noalias_violation` was already shared, it makes sense to test `box_exclusive_violation` with TB too.
Dereference pointers in shims as correct types

Currently, shims will dereference pointers as the type written by the user. This can cause false positives, incorrect behavior such as rust-lang#2136, and even ICEs if a field is not present.

This PR fixes this by having shims dereference pointers with types from `std` or `libc` that we can rely on the layout and field names of instead of with whatever the user passed in.

Fixes rust-lang#1123
add tests for panicky drop in thread_local destructor

Adds a test for rust-lang#112285
@rustbot
Copy link
Collaborator

rustbot commented Jun 29, 2023

The Miri subtree was changed

cc @rust-lang/miri

@rustbot
Copy link
Collaborator

rustbot commented Jun 29, 2023

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@RalfJung
Copy link
Member Author

@bors r p=1

@bors
Copy link
Contributor

bors commented Jun 29, 2023

📌 Commit a3cea7f has been approved by RalfJung

It is now in the queue for this repository.

@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 Jun 29, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Jun 29, 2023

@bors r-

tests are failing due to

error: failed to find or create the directory specified by --out-dir

that's a ui_test failure, huh. I'll check what's up

@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 Jun 29, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Jun 29, 2023

download-ci-llvm is broken... this is gonna take a bit

@RalfJung
Copy link
Member Author

Probably you are hitting #101907; see here for a work-around.

@@ -88,6 88,7 @@ fn test_config(target: &str, path: &str, mode: Mode, with_dependencies: bool) ->
mode,
program,
output_conflict_handling,
out_dir: std::env::var_os("CARGO_TARGET_DIR").unwrap().into(),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this put random files into the out_dir? Maybe it should be a miri subdir of that folder, or so.

Why does this work in Miri CI, is there some kind of default?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea there's a default. I need to fix this in ui_test specifically (should always append ui or sth)

@oli-obk
Copy link
Contributor

oli-obk commented Jun 29, 2023

@bors r=RalfJung,oli-obk

@bors
Copy link
Contributor

bors commented Jun 29, 2023

📌 Commit 78f58f9 has been approved by RalfJung,oli-obk

It is now in the queue for this repository.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 29, 2023
@bors
Copy link
Contributor

bors commented Jun 29, 2023

⌛ Testing commit 78f58f9 with merge e69c730...

@bors
Copy link
Contributor

bors commented Jun 29, 2023

☀️ Test successful - checks-actions
Approved by: RalfJung,oli-obk
Pushing e69c730 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 29, 2023
@bors bors merged commit e69c730 into rust-lang:master Jun 29, 2023
12 checks passed
@rustbot rustbot added this to the 1.72.0 milestone Jun 29, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e69c730): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This 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.

mean range count
Regressions ❌
(primary)
1.1% [0.4%, 2.1%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.9% [-5.3%, -0.4%] 7
Improvements ✅
(secondary)
-4.0% [-4.0%, -4.0%] 1
All ❌✅ (primary) -1.0% [-5.3%, 2.1%] 10

Cycles

Results

This 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.

mean range count
Regressions ❌
(primary)
0.7% [0.7%, 0.7%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.7% [0.7%, 0.7%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 661.411s -> 662.766s (0.20%)

@RalfJung RalfJung deleted the miri branch July 3, 2023 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

None yet

10 participants