Skip to content

Commit 9087312

Browse files
authored
Rollup merge of rust-lang#130467 - RalfJung:miri-sync, r=RalfJung
Miri subtree update r? `@ghost`
2 parents 084e93a + ba86cf8 commit 9087312

File tree

744 files changed

+2718
-2581
lines changed

Some content is hidden

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

744 files changed

+2718
-2581
lines changed

Cargo.lock

+13-45
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,6 @@ dependencies = [
104104
"unicode-width",
105105
]
106106

107-
[[package]]
108-
name = "ansi_term"
109-
version = "0.12.1"
110-
source = "registry+https://github.com/rust-lang/crates.io-index"
111-
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
112-
dependencies = [
113-
"winapi",
114-
]
115-
116107
[[package]]
117108
name = "anstream"
118109
version = "0.6.15"
@@ -714,7 +705,7 @@ dependencies = [
714705
"miow",
715706
"miropt-test-tools",
716707
"regex",
717-
"rustfix 0.8.1",
708+
"rustfix",
718709
"serde",
719710
"serde_json",
720711
"tracing",
@@ -2278,7 +2269,7 @@ dependencies = [
22782269
"rustc_version",
22792270
"smallvec",
22802271
"tempfile",
2281-
"ui_test 0.21.2",
2272+
"ui_test 0.26.5",
22822273
"windows-sys 0.52.0",
22832274
]
22842275

@@ -2807,16 +2798,6 @@ version = "0.1.1"
28072798
source = "registry+https://github.com/rust-lang/crates.io-index"
28082799
checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
28092800

2810-
[[package]]
2811-
name = "prettydiff"
2812-
version = "0.6.4"
2813-
source = "registry+https://github.com/rust-lang/crates.io-index"
2814-
checksum = "8ff1fec61082821f8236cf6c0c14e8172b62ce8a72a0eedc30d3b247bb68dc11"
2815-
dependencies = [
2816-
"ansi_term",
2817-
"pad",
2818-
]
2819-
28202801
[[package]]
28212802
name = "prettydiff"
28222803
version = "0.7.0"
@@ -4625,18 +4606,6 @@ dependencies = [
46254606
"rustdoc",
46264607
]
46274608

4628-
[[package]]
4629-
name = "rustfix"
4630-
version = "0.6.1"
4631-
source = "registry+https://github.com/rust-lang/crates.io-index"
4632-
checksum = "ecd2853d9e26988467753bd9912c3a126f642d05d229a4b53f5752ee36c56481"
4633-
dependencies = [
4634-
"anyhow",
4635-
"log",
4636-
"serde",
4637-
"serde_json",
4638-
]
4639-
46404609
[[package]]
46414610
name = "rustfix"
46424611
version = "0.8.1"
@@ -5518,36 +5487,36 @@ checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9"
55185487

55195488
[[package]]
55205489
name = "ui_test"
5521-
version = "0.21.2"
5490+
version = "0.25.0"
55225491
source = "registry+https://github.com/rust-lang/crates.io-index"
5523-
checksum = "aaf4bf7c184b8dfc7a4d3b90df789b1eb992ee42811cd115f32a7a1eb781058d"
5492+
checksum = "f7e4f339f62edc873975c47115f9e71c5454ddaa37c1142b42fc0b2672c8dacb"
55245493
dependencies = [
5525-
"annotate-snippets 0.9.2",
5494+
"annotate-snippets 0.11.4",
55265495
"anyhow",
55275496
"bstr",
55285497
"cargo-platform",
5529-
"cargo_metadata 0.15.4",
5498+
"cargo_metadata 0.18.1",
55305499
"color-eyre",
55315500
"colored",
55325501
"comma",
55335502
"crossbeam-channel",
55345503
"indicatif",
55355504
"lazy_static",
55365505
"levenshtein",
5537-
"prettydiff 0.6.4",
5506+
"prettydiff",
55385507
"regex",
55395508
"rustc_version",
5540-
"rustfix 0.6.1",
5509+
"rustfix",
55415510
"serde",
55425511
"serde_json",
5543-
"tempfile",
5512+
"spanned",
55445513
]
55455514

55465515
[[package]]
55475516
name = "ui_test"
5548-
version = "0.25.0"
5517+
version = "0.26.5"
55495518
source = "registry+https://github.com/rust-lang/crates.io-index"
5550-
checksum = "f7e4f339f62edc873975c47115f9e71c5454ddaa37c1142b42fc0b2672c8dacb"
5519+
checksum = "32ee4c40e5a5f9fa6864ff976473e5d6a6e9884b6ce68b40690d9f87e1994c83"
55515520
dependencies = [
55525521
"annotate-snippets 0.11.4",
55535522
"anyhow",
@@ -5559,12 +5528,11 @@ dependencies = [
55595528
"comma",
55605529
"crossbeam-channel",
55615530
"indicatif",
5562-
"lazy_static",
55635531
"levenshtein",
5564-
"prettydiff 0.7.0",
5532+
"prettydiff",
55655533
"regex",
55665534
"rustc_version",
5567-
"rustfix 0.8.1",
5535+
"rustfix",
55685536
"serde",
55695537
"serde_json",
55705538
"spanned",

src/tools/miri/.github/workflows/sysroots.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
name: Build the sysroots
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
- name: Build the sysroots
1818
run: |
1919
cargo install -f rustup-toolchain-install-master

src/tools/miri/Cargo.lock

+28-53
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,19 @@ dependencies = [
3939

4040
[[package]]
4141
name = "annotate-snippets"
42-
version = "0.9.2"
42+
version = "0.11.4"
4343
source = "registry+https://github.com/rust-lang/crates.io-index"
44-
checksum = "ccaf7e9dfbb6ab22c82e473cd1a8a7bd313c19a5b7e40970f3d89ef5a5c9e81e"
44+
checksum = "24e35ed54e5ea7997c14ed4c70ba043478db1112e98263b3b035907aa197d991"
4545
dependencies = [
46+
"anstyle",
4647
"unicode-width",
47-
"yansi-term",
4848
]
4949

5050
[[package]]
51-
name = "ansi_term"
52-
version = "0.12.1"
51+
name = "anstyle"
52+
version = "1.0.8"
5353
source = "registry+https://github.com/rust-lang/crates.io-index"
54-
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
55-
dependencies = [
56-
"winapi",
57-
]
54+
checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
5855

5956
[[package]]
6057
name = "anyhow"
@@ -126,9 +123,9 @@ dependencies = [
126123

127124
[[package]]
128125
name = "cargo_metadata"
129-
version = "0.15.4"
126+
version = "0.18.1"
130127
source = "registry+https://github.com/rust-lang/crates.io-index"
131-
checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a"
128+
checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037"
132129
dependencies = [
133130
"camino",
134131
"cargo-platform",
@@ -737,11 +734,11 @@ dependencies = [
737734

738735
[[package]]
739736
name = "prettydiff"
740-
version = "0.6.4"
737+
version = "0.7.0"
741738
source = "registry+https://github.com/rust-lang/crates.io-index"
742-
checksum = "8ff1fec61082821f8236cf6c0c14e8172b62ce8a72a0eedc30d3b247bb68dc11"
739+
checksum = "abec3fb083c10660b3854367697da94c674e9e82aa7511014dc958beeb7215e9"
743740
dependencies = [
744-
"ansi_term",
741+
"owo-colors",
745742
"pad",
746743
]
747744

@@ -865,14 +862,14 @@ dependencies = [
865862

866863
[[package]]
867864
name = "rustfix"
868-
version = "0.6.1"
865+
version = "0.8.5"
869866
source = "registry+https://github.com/rust-lang/crates.io-index"
870-
checksum = "ecd2853d9e26988467753bd9912c3a126f642d05d229a4b53f5752ee36c56481"
867+
checksum = "70f5b7fc8060f4f8373f9381a630304b42e1183535d9beb1d3f596b236c9106a"
871868
dependencies = [
872-
"anyhow",
873-
"log",
874869
"serde",
875870
"serde_json",
871+
"thiserror",
872+
"tracing",
876873
]
877874

878875
[[package]]
@@ -962,6 +959,16 @@ version = "1.13.2"
962959
source = "registry+https://github.com/rust-lang/crates.io-index"
963960
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
964961

962+
[[package]]
963+
name = "spanned"
964+
version = "0.3.0"
965+
source = "registry+https://github.com/rust-lang/crates.io-index"
966+
checksum = "86af297923fbcfd107c20a189a6e9c872160df71a7190ae4a7a6c5dce4b2feb6"
967+
dependencies = [
968+
"bstr",
969+
"color-eyre",
970+
]
971+
965972
[[package]]
966973
name = "syn"
967974
version = "2.0.72"
@@ -1065,9 +1072,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
10651072

10661073
[[package]]
10671074
name = "ui_test"
1068-
version = "0.21.2"
1075+
version = "0.26.5"
10691076
source = "registry+https://github.com/rust-lang/crates.io-index"
1070-
checksum = "aaf4bf7c184b8dfc7a4d3b90df789b1eb992ee42811cd115f32a7a1eb781058d"
1077+
checksum = "32ee4c40e5a5f9fa6864ff976473e5d6a6e9884b6ce68b40690d9f87e1994c83"
10711078
dependencies = [
10721079
"annotate-snippets",
10731080
"anyhow",
@@ -1079,15 +1086,14 @@ dependencies = [
10791086
"comma",
10801087
"crossbeam-channel",
10811088
"indicatif",
1082-
"lazy_static",
10831089
"levenshtein",
10841090
"prettydiff",
10851091
"regex",
10861092
"rustc_version",
10871093
"rustfix",
10881094
"serde",
10891095
"serde_json",
1090-
"tempfile",
1096+
"spanned",
10911097
]
10921098

10931099
[[package]]
@@ -1120,28 +1126,6 @@ version = "0.11.0+wasi-snapshot-preview1"
11201126
source = "registry+https://github.com/rust-lang/crates.io-index"
11211127
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
11221128

1123-
[[package]]
1124-
name = "winapi"
1125-
version = "0.3.9"
1126-
source = "registry+https://github.com/rust-lang/crates.io-index"
1127-
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
1128-
dependencies = [
1129-
"winapi-i686-pc-windows-gnu",
1130-
"winapi-x86_64-pc-windows-gnu",
1131-
]
1132-
1133-
[[package]]
1134-
name = "winapi-i686-pc-windows-gnu"
1135-
version = "0.4.0"
1136-
source = "registry+https://github.com/rust-lang/crates.io-index"
1137-
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
1138-
1139-
[[package]]
1140-
name = "winapi-x86_64-pc-windows-gnu"
1141-
version = "0.4.0"
1142-
source = "registry+https://github.com/rust-lang/crates.io-index"
1143-
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
1144-
11451129
[[package]]
11461130
name = "windows-sys"
11471131
version = "0.48.0"
@@ -1281,15 +1265,6 @@ version = "0.52.6"
12811265
source = "registry+https://github.com/rust-lang/crates.io-index"
12821266
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
12831267

1284-
[[package]]
1285-
name = "yansi-term"
1286-
version = "0.1.2"
1287-
source = "registry+https://github.com/rust-lang/crates.io-index"
1288-
checksum = "fe5c30ade05e61656247b2e334a031dfd0cc466fadef865bdcdea8d537951bf1"
1289-
dependencies = [
1290-
"winapi",
1291-
]
1292-
12931268
[[package]]
12941269
name = "zerocopy"
12951270
version = "0.7.35"

src/tools/miri/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ windows-sys = { version = "0.52", features = [
4949

5050
[dev-dependencies]
5151
colored = "2"
52-
ui_test = "0.21.1"
52+
ui_test = "0.26.5"
5353
rustc_version = "0.4"
5454
regex = "1.5.5"
5555
tempfile = "3"

src/tools/miri/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ Here is an example job for GitHub Actions:
187187
name: "Miri"
188188
runs-on: ubuntu-latest
189189
steps:
190-
- uses: actions/checkout@v3
190+
- uses: actions/checkout@v4
191191
- name: Install Miri
192192
run: |
193193
rustup toolchain install nightly --component miri
@@ -216,9 +216,9 @@ degree documented below):
216216
- For every other target with OS `linux`, `macos`, or `windows`, Miri should generally work, but we
217217
make no promises and we don't run tests for such targets.
218218
- We have unofficial support (not maintained by the Miri team itself) for some further operating systems.
219+
- `solaris` / `illumos`: maintained by @devnexen. Supports `std::{env, thread, sync}`, but not `std::fs`.
219220
- `freebsd`: **maintainer wanted**. Supports `std::env` and parts of `std::{thread, fs}`, but not `std::sync`.
220221
- `android`: **maintainer wanted**. Support very incomplete, but a basic "hello world" works.
221-
- `solaris` / `illumos`: maintained by @devnexen. Support very incomplete, but a basic "hello world" works.
222222
- `wasm`: **maintainer wanted**. Support very incomplete, not even standard output works, but an empty `main` function works.
223223
- For targets on other operating systems, Miri might fail before even reaching the `main` function.
224224

src/tools/miri/ci/ci.sh

+9-7
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ time ./miri install
2626
# We enable all features to make sure the Stacked Borrows consistency check runs.
2727
echo "Building debug version of Miri"
2828
export CARGO_EXTRA_FLAGS="$CARGO_EXTRA_FLAGS --all-features"
29-
time ./miri build --all-targets # the build that all the `./miri test` below will use
29+
time ./miri build # the build that all the `./miri test` below will use
3030

3131
endgroup
3232

@@ -66,7 +66,7 @@ function run_tests {
6666
time MIRIFLAGS="${MIRIFLAGS-} -O -Zmir-opt-level=4 -Cdebug-assertions=yes" MIRI_SKIP_UI_CHECKS=1 ./miri test $TARGET_FLAG tests/{pass,panic}
6767
fi
6868
if [ -n "${MANY_SEEDS-}" ]; then
69-
# Also run some many-seeds tests.
69+
# Also run some many-seeds tests. (Also tests `./miri run`.)
7070
time for FILE in tests/many-seeds/*.rs; do
7171
./miri run "--many-seeds=0..$MANY_SEEDS" $TARGET_FLAG "$FILE"
7272
done
@@ -75,6 +75,8 @@ function run_tests {
7575
# Check that the benchmarks build and run, but only once.
7676
time HYPERFINE="hyperfine -w0 -r1" ./miri bench $TARGET_FLAG
7777
fi
78+
# Smoke-test `./miri run --dep`.
79+
./miri run $TARGET_FLAG --dep tests/pass-dep/getrandom.rs
7880

7981
## test-cargo-miri
8082
# On Windows, there is always "python", not "python3" or "python2".
@@ -148,11 +150,11 @@ case $HOST_TARGET in
148150
# Partially supported targets (tier 2)
149151
BASIC="empty_main integer vec string btreemap hello hashmap heap_alloc align" # ensures we have the basics: stdout/stderr, system allocator, randomness (for HashMap initialization)
150152
UNIX="panic/panic panic/unwind concurrency/simple atomic libc-mem libc-misc libc-random env num_cpus" # the things that are very similar across all Unixes, and hence easily supported there
151-
TEST_TARGET=x86_64-unknown-freebsd run_tests_minimal $BASIC $UNIX threadname libc-time fs
152-
TEST_TARGET=i686-unknown-freebsd run_tests_minimal $BASIC $UNIX threadname libc-time fs
153-
TEST_TARGET=x86_64-unknown-illumos run_tests_minimal $BASIC $UNIX threadname pthread-sync available-parallelism libc-time tls
154-
TEST_TARGET=x86_64-pc-solaris run_tests_minimal $BASIC $UNIX threadname pthread-sync available-parallelism libc-time tls
155-
TEST_TARGET=aarch64-linux-android run_tests_minimal $BASIC $UNIX
153+
TEST_TARGET=x86_64-unknown-freebsd run_tests_minimal $BASIC $UNIX threadname pthread time fs
154+
TEST_TARGET=i686-unknown-freebsd run_tests_minimal $BASIC $UNIX threadname pthread time fs
155+
TEST_TARGET=x86_64-unknown-illumos run_tests_minimal $BASIC $UNIX thread sync available-parallelism time tls
156+
TEST_TARGET=x86_64-pc-solaris run_tests_minimal $BASIC $UNIX thread sync available-parallelism time tls
157+
TEST_TARGET=aarch64-linux-android run_tests_minimal $BASIC $UNIX pthread --skip threadname --skip pthread_cond_timedwait
156158
TEST_TARGET=wasm32-wasip2 run_tests_minimal empty_main wasm heap_alloc libc-mem
157159
TEST_TARGET=wasm32-unknown-unknown run_tests_minimal empty_main wasm
158160
TEST_TARGET=thumbv7em-none-eabihf run_tests_minimal no_std

0 commit comments

Comments
 (0)