Skip to content

Commit 75f7d93

Browse files
authored
Unrolled build for #150671
Rollup merge of #150671 - RalfJung:miri, r=RalfJung miri subtree update Subtree update of `miri` to rust-lang/miri@5d149f2. Created using https://github.com/rust-lang/josh-sync. r? `@ghost`
2 parents 5afdf5d + ff2acf0 commit 75f7d93

Some content is hidden

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

47 files changed

+745
-379
lines changed

Cargo.lock

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -445,22 +445,21 @@ dependencies = [
445445

446446
[[package]]
447447
name = "capstone"
448-
version = "0.13.0"
448+
version = "0.14.0"
449449
source = "registry+https://github.com/rust-lang/crates.io-index"
450-
checksum = "015ef5d5ca1743e3f94af9509ba6bd2886523cfee46e48d15c2ef5216fd4ac9a"
450+
checksum = "f442ae0f2f3f1b923334b4a5386c95c69c1cfa072bafa23d6fae6d9682eb1dd4"
451451
dependencies = [
452452
"capstone-sys",
453-
"libc",
453+
"static_assertions",
454454
]
455455

456456
[[package]]
457457
name = "capstone-sys"
458-
version = "0.17.0"
458+
version = "0.18.0"
459459
source = "registry+https://github.com/rust-lang/crates.io-index"
460-
checksum = "2267cb8d16a1e4197863ec4284ffd1aec26fe7e57c58af46b02590a0235809a0"
460+
checksum = "a4e8087cab6731295f5a2a2bd82989ba4f41d3a428aab2e7c98d8f4db38aac05"
461461
dependencies = [
462462
"cc",
463-
"libc",
464463
]
465464

466465
[[package]]
@@ -2232,19 +2231,19 @@ dependencies = [
22322231

22332232
[[package]]
22342233
name = "libffi"
2235-
version = "5.0.0"
2234+
version = "5.1.0"
22362235
source = "registry+https://github.com/rust-lang/crates.io-index"
2237-
checksum = "0444124f3ffd67e1b0b0c661a7f81a278a135eb54aaad4078e79fbc8be50c8a5"
2236+
checksum = "0498fe5655f857803e156523e644dcdcdc3b3c7edda42ea2afdae2e09b2db87b"
22382237
dependencies = [
22392238
"libc",
22402239
"libffi-sys",
22412240
]
22422241

22432242
[[package]]
22442243
name = "libffi-sys"
2245-
version = "4.0.0"
2244+
version = "4.1.0"
22462245
source = "registry+https://github.com/rust-lang/crates.io-index"
2247-
checksum = "3d722da8817ea580d0669da6babe2262d7b86a1af1103da24102b8bb9c101ce7"
2246+
checksum = "71d4f1d4ce15091955144350b75db16a96d4a63728500122706fb4d29a26afbb"
22482247
dependencies = [
22492248
"cc",
22502249
]

src/tools/miri/Cargo.lock

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -123,22 +123,21 @@ dependencies = [
123123

124124
[[package]]
125125
name = "capstone"
126-
version = "0.13.0"
126+
version = "0.14.0"
127127
source = "registry+https://github.com/rust-lang/crates.io-index"
128-
checksum = "015ef5d5ca1743e3f94af9509ba6bd2886523cfee46e48d15c2ef5216fd4ac9a"
128+
checksum = "f442ae0f2f3f1b923334b4a5386c95c69c1cfa072bafa23d6fae6d9682eb1dd4"
129129
dependencies = [
130130
"capstone-sys",
131-
"libc",
131+
"static_assertions",
132132
]
133133

134134
[[package]]
135135
name = "capstone-sys"
136-
version = "0.17.0"
136+
version = "0.18.0"
137137
source = "registry+https://github.com/rust-lang/crates.io-index"
138-
checksum = "2267cb8d16a1e4197863ec4284ffd1aec26fe7e57c58af46b02590a0235809a0"
138+
checksum = "a4e8087cab6731295f5a2a2bd82989ba4f41d3a428aab2e7c98d8f4db38aac05"
139139
dependencies = [
140140
"cc",
141-
"libc",
142141
]
143142

144143
[[package]]
@@ -786,19 +785,19 @@ checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976"
786785

787786
[[package]]
788787
name = "libffi"
789-
version = "5.0.0"
788+
version = "5.1.0"
790789
source = "registry+https://github.com/rust-lang/crates.io-index"
791-
checksum = "0444124f3ffd67e1b0b0c661a7f81a278a135eb54aaad4078e79fbc8be50c8a5"
790+
checksum = "0498fe5655f857803e156523e644dcdcdc3b3c7edda42ea2afdae2e09b2db87b"
792791
dependencies = [
793792
"libc",
794793
"libffi-sys",
795794
]
796795

797796
[[package]]
798797
name = "libffi-sys"
799-
version = "4.0.0"
798+
version = "4.1.0"
800799
source = "registry+https://github.com/rust-lang/crates.io-index"
801-
checksum = "3d722da8817ea580d0669da6babe2262d7b86a1af1103da24102b8bb9c101ce7"
800+
checksum = "71d4f1d4ce15091955144350b75db16a96d4a63728500122706fb4d29a26afbb"
802801
dependencies = [
803802
"cc",
804803
]
@@ -1404,6 +1403,12 @@ version = "1.2.1"
14041403
source = "registry+https://github.com/rust-lang/crates.io-index"
14051404
checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
14061405

1406+
[[package]]
1407+
name = "static_assertions"
1408+
version = "1.1.0"
1409+
source = "registry+https://github.com/rust-lang/crates.io-index"
1410+
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
1411+
14071412
[[package]]
14081413
name = "strsim"
14091414
version = "0.11.1"

src/tools/miri/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ serde_json = { version = "1.0", optional = true }
3232
[target.'cfg(unix)'.dependencies]
3333
libc = "0.2"
3434
# native-lib dependencies
35-
libffi = { version = "5.0.0", optional = true }
35+
libffi = { version = "5.1.0", optional = true }
3636
libloading = { version = "0.9", optional = true }
3737
serde = { version = "1.0.219", features = ["derive"], optional = true }
3838

3939
[target.'cfg(target_os = "linux")'.dependencies]
4040
nix = { version = "0.30.1", features = ["mman", "ptrace", "signal"], optional = true }
4141
ipc-channel = { version = "0.20.0", optional = true }
42-
capstone = { version = "0.13", optional = true }
42+
capstone = { version = "0.14", optional = true }
4343

4444
[target.'cfg(all(target_os = "linux", target_pointer_width = "64", target_endian = "little"))'.dependencies]
4545
genmc-sys = { path = "./genmc-sys/", version = "0.1.0", optional = true }
@@ -68,6 +68,7 @@ expensive-consistency-checks = ["stack-cache"]
6868
tracing = ["serde_json"]
6969
native-lib = ["dep:libffi", "dep:libloading", "dep:capstone", "dep:ipc-channel", "dep:nix", "dep:serde"]
7070
jemalloc = []
71+
check_only = ["libffi?/check_only", "capstone?/check_only", "genmc-sys?/check_only"]
7172

7273
[lints.rust.unexpected_cfgs]
7374
level = "warn"

src/tools/miri/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ degree documented below):
219219
- We have unofficial support (not maintained by the Miri team itself) for some further operating systems.
220220
- `solaris` / `illumos`: maintained by @devnexen. Supports the entire test suite.
221221
- `freebsd`: maintained by @YohDeadfall and @LorrensP-2158466. Supports the entire test suite.
222-
- `android`: **maintainer wanted**. Basic OS APIs and concurrency work, but file system access is not supported.
222+
- `android`: **maintainer wanted**. Supports the entire test suite.
223223
- For targets on other operating systems, Miri might fail before even reaching the `main` function.
224224

225225
However, even for targets that we do support, the degree of support for accessing platform APIs

src/tools/miri/ci/ci.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ export CARGO_INCREMENTAL=0
3030
export CARGO_EXTRA_FLAGS="--locked"
3131

3232
# Determine configuration for installed build (used by test-cargo-miri and `./miri bench`).
33+
# We use the default set of features for this.
3334
echo "Installing release version of Miri"
3435
time ./miri install
3536

3637
# Prepare debug build for direct `./miri` invocations.
37-
# We enable all features to make sure the Stacked Borrows consistency check runs.
38+
# Here we enable some more features and checks.
3839
echo "Building debug version of Miri"
39-
export CARGO_EXTRA_FLAGS="$CARGO_EXTRA_FLAGS --all-features"
40-
time ./miri build # the build that all the `./miri test` below will use
40+
export FEATURES="--features=expensive-consistency-checks,genmc"
41+
time ./miri build $FEATURES # the build that all the `./miri test` below will use
4142

4243
endgroup
4344

@@ -63,7 +64,7 @@ function run_tests {
6364
if [ -n "${GC_STRESS-}" ]; then
6465
time MIRIFLAGS="${MIRIFLAGS-} -Zmiri-provenance-gc=1" ./miri test $TARGET_FLAG
6566
else
66-
time ./miri test $TARGET_FLAG
67+
time ./miri test $FEATURES $TARGET_FLAG
6768
fi
6869

6970
## advanced tests
@@ -74,20 +75,20 @@ function run_tests {
7475
# them. Also error locations change so we don't run the failing tests.
7576
# We explicitly enable debug-assertions here, they are disabled by -O but we have tests
7677
# which exist to check that we panic on debug assertion failures.
77-
time MIRIFLAGS="${MIRIFLAGS-} -O -Zmir-opt-level=4 -Cdebug-assertions=yes" MIRI_SKIP_UI_CHECKS=1 ./miri test $TARGET_FLAG tests/{pass,panic}
78+
time MIRIFLAGS="${MIRIFLAGS-} -O -Zmir-opt-level=4 -Cdebug-assertions=yes" MIRI_SKIP_UI_CHECKS=1 ./miri test $FEATURES $TARGET_FLAG tests/{pass,panic}
7879
fi
7980
if [ -n "${MANY_SEEDS-}" ]; then
8081
# Run many-seeds tests. (Also tests `./miri run`.)
8182
time for FILE in tests/many-seeds/*.rs; do
82-
./miri run "-Zmiri-many-seeds=0..$MANY_SEEDS" $TARGET_FLAG "$FILE"
83+
./miri run $FEATURES "-Zmiri-many-seeds=0..$MANY_SEEDS" $TARGET_FLAG "$FILE"
8384
done
85+
# Smoke-test `./miri run --dep`.
86+
./miri run $FEATURES $TARGET_FLAG --dep tests/pass-dep/getrandom.rs
8487
fi
8588
if [ -n "${TEST_BENCH-}" ]; then
8689
# Check that the benchmarks build and run, but only once.
8790
time HYPERFINE="hyperfine -w0 -r1 --show-output" ./miri bench $TARGET_FLAG --no-install
8891
fi
89-
# Smoke-test `./miri run --dep`.
90-
./miri run $TARGET_FLAG --dep tests/pass-dep/getrandom.rs
9192

9293
## test-cargo-miri
9394
# On Windows, there is always "python", not "python3" or "python2".
@@ -149,10 +150,11 @@ case $HOST_TARGET in
149150
i686-unknown-linux-gnu)
150151
# Host
151152
MIR_OPT=1 MANY_SEEDS=64 TEST_BENCH=1 CARGO_MIRI_ENV=1 run_tests
153+
# Fully, but not officially, supported tier 2
154+
MANY_SEEDS=16 TEST_TARGET=aarch64-linux-android run_tests
152155
# Partially supported targets (tier 2)
153156
BASIC="empty_main integer heap_alloc libc-mem vec string btreemap" # ensures we have the basics: pre-main code, system allocator
154157
UNIX="hello 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
155-
TEST_TARGET=aarch64-linux-android run_tests_minimal $BASIC $UNIX time hashmap random thread sync concurrency epoll eventfd prctl
156158
TEST_TARGET=wasm32-unknown-unknown run_tests_minimal no_std empty_main wasm # this target doesn't really have std
157159
TEST_TARGET=thumbv7em-none-eabihf run_tests_minimal no_std
158160
;;

src/tools/miri/etc/rust_analyzer_helix.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ invocationStrategy = "once"
2727
overrideCommand = [
2828
"./miri",
2929
"check",
30-
"--no-default-features",
3130
"-Zunstable-options",
3231
"--compile-time-deps",
3332
"--message-format=json",

src/tools/miri/etc/rust_analyzer_vscode.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"rust-analyzer.cargo.buildScripts.overrideCommand": [
2222
"./miri",
2323
"check",
24-
"--no-default-features",
2524
"-Zunstable-options",
2625
"--compile-time-deps",
2726
"--message-format=json",

src/tools/miri/etc/rust_analyzer_zed.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"overrideCommand": [
3131
"./miri",
3232
"check",
33-
"--no-default-features",
3433
"-Zunstable-options",
3534
"--compile-time-deps",
3635
"--message-format=json"

src/tools/miri/genmc-sys/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ cc = "1.2.16"
1313
cmake = "0.1.54"
1414
git2 = { version = "0.20.2", default-features = false, features = ["https"] }
1515
cxx-build = { version = "1.0.173", features = ["parallel"] }
16+
17+
[features]
18+
check_only = []

src/tools/miri/genmc-sys/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,11 @@ fn compile_cpp_dependencies(genmc_path: &Path, always_configure: bool) {
202202
}
203203

204204
fn main() {
205+
// For check-only builds, we don't need to do anything.
206+
if cfg!(feature = "check_only") {
207+
return;
208+
}
209+
205210
// Select which path to use for the GenMC repo:
206211
let (genmc_path, always_configure) = if let Some(genmc_src_path) = option_env!("GENMC_SRC_PATH")
207212
{

0 commit comments

Comments
 (0)