Skip to content

Commit 81907f7

Browse files
committed
Auto merge of #124368 - RalfJung:miri, r=RalfJung
Miri subtree update r? `@ghost`
2 parents 0951755 + 2b676f2 commit 81907f7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3261
-514
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
env:
3333
HOST_TARGET: ${{ matrix.host_target }}
3434
steps:
35-
- uses: actions/checkout@v3
35+
- uses: actions/checkout@v4
3636

3737
- name: Show Rust version (stable toolchain)
3838
run: |
@@ -57,12 +57,12 @@ jobs:
5757
~/.cargo/bin
5858
~/.cargo/.crates.toml
5959
~/.cargo/.crates2.json
60-
key: cargo-${{ runner.os }}-reset20240331-${{ hashFiles('**/Cargo.lock') }}
61-
restore-keys: cargo-${{ runner.os }}-reset20240331
60+
key: cargo-${{ runner.os }}-reset20240425-${{ hashFiles('**/Cargo.lock') }}
61+
restore-keys: cargo-${{ runner.os }}-reset20240425
6262

63-
- name: Install rustup-toolchain-install-master
63+
- name: Install tools
6464
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
65-
run: cargo install -f rustup-toolchain-install-master
65+
run: cargo install -f rustup-toolchain-install-master hyperfine
6666

6767
- name: Install miri toolchain
6868
run: |
@@ -85,7 +85,7 @@ jobs:
8585
name: style checks
8686
runs-on: ubuntu-latest
8787
steps:
88-
- uses: actions/checkout@v3
88+
- uses: actions/checkout@v4
8989

9090
# This is exactly duplicated from above. GHA is pretty terrible when it comes
9191
# to avoiding code duplication.
@@ -165,7 +165,7 @@ jobs:
165165
name: cronjob failure notification
166166
runs-on: ubuntu-latest
167167
needs: [build, style]
168-
if: github.event_name == 'schedule' && (failure() || cancelled())
168+
if: github.event_name == 'schedule' && failure()
169169
steps:
170170
# Send a Zulip notification
171171
- name: Install zulip-send
@@ -191,7 +191,7 @@ jobs:
191191
The Miri Cronjobs Bot'
192192
193193
# Attempt to auto-sync with rustc
194-
- uses: actions/checkout@v3
194+
- uses: actions/checkout@v4
195195
with:
196196
fetch-depth: 256 # get a bit more of the history
197197
- name: install josh-proxy

Cargo.lock

Lines changed: 193 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ smallvec = "1.7"
2424
aes = { version = "0.8.3", features = ["hazmat"] }
2525
measureme = "11"
2626
ctrlc = "3.2.5"
27+
chrono = { version = "0.4.38", default-features = false, features = ["clock"] }
28+
directories = "5"
2729

2830
# Copied from `compiler/rustc/Cargo.toml`.
2931
# But only for some targets, it fails for others. Rustc configures this in its CI, but we can't

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,10 @@ environment variable. We first document the most relevant and most commonly used
321321
* `-Zmiri-env-forward=<var>` forwards the `var` environment variable to the interpreted program. Can
322322
be used multiple times to forward several variables. Execution will still be deterministic if the
323323
value of forwarded variables stays the same. Has no effect if `-Zmiri-disable-isolation` is set.
324+
* `-Zmiri-env-set=<var>=<value>` sets the `var` environment variable to `value` in the interpreted program.
325+
It can be used to pass environment variables without needing to alter the host environment. It can
326+
be used multiple times to set several variables. If `-Zmiri-disable-isolation` or `-Zmiri-env-forward`
327+
is set, values set with this option will have priority over values from the host environment.
324328
* `-Zmiri-ignore-leaks` disables the memory leak checker, and also allows some
325329
remaining threads to exist when the main thread exits.
326330
* `-Zmiri-isolation-error=<action>` configures Miri's response to operations
@@ -560,7 +564,8 @@ used according to their aliasing restrictions.
560564

561565
## Bugs found by Miri
562566

563-
Miri has already found a number of bugs in the Rust standard library and beyond, which we collect here.
567+
Miri has already found a number of bugs in the Rust standard library and beyond, some of which we collect here.
568+
If Miri helped you find a subtle UB bug in your code, we'd appreciate a PR adding it to the list!
564569

565570
Definite bugs found:
566571

@@ -595,6 +600,7 @@ Definite bugs found:
595600
* [Deallocating with the wrong layout in new specializations for in-place `Iterator::collect`](https://github.com/rust-lang/rust/pull/118460)
596601
* [Incorrect offset computation for highly-aligned types in `portable-atomic-util`](https://github.com/taiki-e/portable-atomic/pull/138)
597602
* [Occasional memory leak in `std::mpsc` channels](https://github.com/rust-lang/rust/issues/121582) (original code in [crossbeam](https://github.com/crossbeam-rs/crossbeam/pull/1084))
603+
* [Weak-memory-induced memory leak in Windows thread-local storage](https://github.com/rust-lang/rust/pull/124281)
598604

599605
Violations of [Stacked Borrows] found that are likely bugs (but Stacked Borrows is currently just an experiment):
600606

0 commit comments

Comments
 (0)