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 #114211

Merged
merged 18 commits into from
Jul 29, 2023
Merged

update Miri #114211

merged 18 commits into from
Jul 29, 2023

Conversation

RalfJung
Copy link
Member

r? @ghost

The Miri Conjob Bot and others added 18 commits July 26, 2023 06:24
TB: Redefine trigger condition for protectors

The Coq formalization revealed that as currently implemented, read accesses did not always commute.
Indeed starting from a lazily initialized `Active` protected tag, applying a foreign read then a child read produces `Frozen`, but child read then foreign read triggers UB (because the child read initializes _before_ the `Active -> Frozen`).

This reformulation of when protectors trigger fixes that issue:
- instead of `Active + foreign read -> Frozen` and `Active -> Frozen` when protected is UB
- we do `Active + foreign read -> if protected { Disabled } else { Frozen }`

There is already precedent for transitions being dependent on the presence of a protector (`Reserved + foreign read -> if protected { Frozen } else { Reserved }`), and this has the nice side-effect of simplifying the protector trigger condition to just an equality check against `Disabled` since now there is protector UB iff a protected tag becomes `Disabled`.

In order not to introduce an extra `if`, it was decided that `Disabled -> Disabled` would be UB when protected, which was not the case previously. This is merely a theoretical for now because a protected `Disabled` is unreachable in the first place.

The extra test is not directly related to this modification, but also checks things related to protectors and lazy initialization.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 29, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jul 29, 2023

The Miri subtree was changed

cc @rust-lang/miri

@RalfJung
Copy link
Member Author

@bors r+

@bors
Copy link
Contributor

bors commented Jul 29, 2023

📌 Commit 70757fb 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 Jul 29, 2023
@bors
Copy link
Contributor

bors commented Jul 29, 2023

⌛ Testing commit 70757fb with merge 32303b2...

@bors
Copy link
Contributor

bors commented Jul 29, 2023

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing 32303b2 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 29, 2023
@bors bors merged commit 32303b2 into rust-lang:master Jul 29, 2023
@rustbot rustbot added this to the 1.73.0 milestone Jul 29, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (32303b2): 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)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
2.1% [2.1%, 2.1%] 1
Improvements ✅
(primary)
-1.4% [-1.5%, -1.1%] 3
Improvements ✅
(secondary)
-1.6% [-1.6%, -1.6%] 1
All ❌✅ (primary) -0.4% [-1.5%, 2.4%] 4

Cycles

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

Binary size

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

Bootstrap: 651.287s -> 652.626s (0.21%)

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.

5 participants