Skip to content

Miri subtree update #123260

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

Merged
merged 37 commits into from
Mar 31, 2024
Merged

Miri subtree update #123260

merged 37 commits into from
Mar 31, 2024

Conversation

RalfJung
Copy link
Member

r? @ghost

RalfJung and others added 30 commits March 26, 2024 08:27
…lfJung

we have to ignore RUSTC_WORKSPACE_WRAPPER as well

This matches what we do with RUSTC_WRAPPER.
cargo-miri, miri-script, tests/ui: misc simplifications and comments

Parts of rust-lang/miri#3411 that can be landed now.
There should never be an `Active` but not initialized node in the
borrow tree. If such a node exists, and if it has a protector, then
on a foreign read, it could become disabled. This leads to some
problems when formally proving that read-reordering optimizations are
sound.

The root node is the only node for which this can happen, since all
other nodes can only become `Active` when actually used. But special-
casing the root node here is annoying to reason about, everything
becomes much nicer if we can simply say that *all* `Active` nodes
must be initialized. This requires making the root node default-
initialized.

This is also more intuitive, since the root arguably becomes ini-
tialized during the allocation, which can be considered a write.
…d-root, r=RalfJung

Tree Borrows: Make tree root always be initialized

This PR fixes a slight annoyance we discovered while formally proving that certain optimizations are sound with Tree Borrows. In particular... (copied from the commit message):

There should never be an `Active` but not initialized node in the borrow tree. If such a node exists, and if it has a protector, then on a foreign read, it could become disabled. This leads to some problems when formally proving that read moving optimizations are sound.

The root node is the only node for which this can happen, since all other nodes can only become `Active` when actually used. But special-casing the root node here is annoying to reason about, everything becomes much nicer if we can simply say that *all* `Active` nodes must be initialized. This requires making the root node default-initialized.

This is also more intuitive, since the root arguably becomes initialized during the allocation, which can be considered a write.
add eyre to test-cargo-miri

Same as anyhow: custom build probe, widely used.
avoid mutating the global environment

`remove_var` is just as bad as `set_var`, let's not do that.
and remove serde_derive, since the --extern .so file was really just a consequence of building a proc macro
test-cargo-miri: add proc-macro2

This is already in the dependency tree of `serde_derive`, but I guess there is is a host dependency, here it is a target dependency.

The logic is presumably the same as in anyhow, so we don't need both; let's test the one that is more widely used.
make some doc comments not doc tests

`./miri test --doc` will run doctests even if we have them disabled (that's a cargo quirk: rust-lang/cargo#13668). This fixes that command to not fail.
RalfJung and others added 7 commits March 30, 2024 18:45
run GC stress test only for host tests

I suspect these are a significant contributor to our Linux CI job being by far the slowest currently. Let's see.

We have Linux, Windows, and macOS hosts so all major OSes are still covered.
…ency, r=RalfJung

cotrol stacked borrows consistency check with its own feature flag

Fixes rust-lang/miri#3431
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 31, 2024
@rustbot
Copy link
Collaborator

rustbot commented Mar 31, 2024

The Miri subtree was changed

cc @rust-lang/miri

@RalfJung
Copy link
Member Author

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 31, 2024

📌 Commit d5de305 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 Mar 31, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 31, 2024
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#123189 (Log BOLT args in bootstrap `rustc` shim)
 - rust-lang#123211 (Stop calling visitors `V`)
 - rust-lang#123242 (pattern analysis: Require enum indices to be contiguous)
 - rust-lang#123260 (Miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9abf4bc into rust-lang:master Mar 31, 2024
11 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 31, 2024
Rollup merge of rust-lang#123260 - RalfJung:miri, r=RalfJung

Miri subtree update

r? `@ghost`
@rustbot rustbot added this to the 1.79.0 milestone Mar 31, 2024
@RalfJung RalfJung deleted the miri branch March 31, 2024 12:28
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.

4 participants