Commit eeb4431

Browse files
authored
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 cdddb85 + ff2acf0 commit eeb4431

47 files changed

Lines changed: 745 additions & 379 deletions

Some content is hidden

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

‎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-
exportCARGO_EXTRA_FLAGS="$CARGO_EXTRA_FLAGS --all-features"
40-
time ./miri build # the build that all the `./miri test` below will use
40+
exportFEATURES="--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
timeforFILEin 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$UNIXtime 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
fnmain(){
205+
// For check-only builds, we don't need to do anything.
206+
ifcfg!(feature = "check_only"){
207+
return;
208+
}
209+
205210
// Select which path to use for the GenMC repo:
206211
let(genmc_path, always_configure) = ifletSome(genmc_src_path) = option_env!("GENMC_SRC_PATH")
207212
{

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Commit eeb4431

Browse files
authored
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 cdddb85 + ff2acf0 commit eeb4431

47 files changed

Lines changed: 745 additions & 379 deletions

Some content is hidden

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

‎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-
exportCARGO_EXTRA_FLAGS="$CARGO_EXTRA_FLAGS --all-features"
40-
time ./miri build # the build that all the `./miri test` below will use
40+
exportFEATURES="--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
timeforFILEin 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$UNIXtime 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
fnmain(){
205+
// For check-only builds, we don't need to do anything.
206+
ifcfg!(feature = "check_only"){
207+
return;
208+
}
209+
205210
// Select which path to use for the GenMC repo:
206211
let(genmc_path, always_configure) = ifletSome(genmc_src_path) = option_env!("GENMC_SRC_PATH")
207212
{

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit eeb4431

Browse files
authored
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 cdddb85 + ff2acf0 commit eeb4431

47 files changed

Lines changed: 745 additions & 379 deletions

Some content is hidden

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

‎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-
exportCARGO_EXTRA_FLAGS="$CARGO_EXTRA_FLAGS --all-features"
40-
time ./miri build # the build that all the `./miri test` below will use
40+
exportFEATURES="--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
timeforFILEin 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$UNIXtime 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
fnmain(){
205+
// For check-only builds, we don't need to do anything.
206+
ifcfg!(feature = "check_only"){
207+
return;
208+
}
209+
205210
// Select which path to use for the GenMC repo:
206211
let(genmc_path, always_configure) = ifletSome(genmc_src_path) = option_env!("GENMC_SRC_PATH")
207212
{

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit eeb4431

Browse files
authored
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 cdddb85 + ff2acf0 commit eeb4431

47 files changed

Lines changed: 745 additions & 379 deletions

Some content is hidden

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

‎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-
exportCARGO_EXTRA_FLAGS="$CARGO_EXTRA_FLAGS --all-features"
40-
time ./miri build # the build that all the `./miri test` below will use
40+
exportFEATURES="--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
timeforFILEin 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$UNIXtime 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
fnmain(){
205+
// For check-only builds, we don't need to do anything.
206+
ifcfg!(feature = "check_only"){
207+
return;
208+
}
209+
205210
// Select which path to use for the GenMC repo:
206211
let(genmc_path, always_configure) = ifletSome(genmc_src_path) = option_env!("GENMC_SRC_PATH")
207212
{

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Commit eeb4431

Browse files
authored
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 cdddb85 + ff2acf0 commit eeb4431

47 files changed

Lines changed: 745 additions & 379 deletions

Some content is hidden

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

‎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-
exportCARGO_EXTRA_FLAGS="$CARGO_EXTRA_FLAGS --all-features"
40-
time ./miri build # the build that all the `./miri test` below will use
40+
exportFEATURES="--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
timeforFILEin 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$UNIXtime 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
fnmain(){
205+
// For check-only builds, we don't need to do anything.
206+
ifcfg!(feature = "check_only"){
207+
return;
208+
}
209+
205210
// Select which path to use for the GenMC repo:
206211
let(genmc_path, always_configure) = ifletSome(genmc_src_path) = option_env!("GENMC_SRC_PATH")
207212
{

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit eeb4431

Browse files
authored
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 cdddb85 + ff2acf0 commit eeb4431

47 files changed

Lines changed: 745 additions & 379 deletions

Some content is hidden

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

‎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-
exportCARGO_EXTRA_FLAGS="$CARGO_EXTRA_FLAGS --all-features"
40-
time ./miri build # the build that all the `./miri test` below will use
40+
exportFEATURES="--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
timeforFILEin 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$UNIXtime 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
fnmain(){
205+
// For check-only builds, we don't need to do anything.
206+
ifcfg!(feature = "check_only"){
207+
return;
208+
}
209+
205210
// Select which path to use for the GenMC repo:
206211
let(genmc_path, always_configure) = ifletSome(genmc_src_path) = option_env!("GENMC_SRC_PATH")
207212
{

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit eeb4431

Browse files
authored
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 cdddb85 + ff2acf0 commit eeb4431

47 files changed

Lines changed: 745 additions & 379 deletions

Some content is hidden

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

‎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-
exportCARGO_EXTRA_FLAGS="$CARGO_EXTRA_FLAGS --all-features"
40-
time ./miri build # the build that all the `./miri test` below will use
40+
exportFEATURES="--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
timeforFILEin 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$UNIXtime 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
fnmain(){
205+
// For check-only builds, we don't need to do anything.
206+
ifcfg!(feature = "check_only"){
207+
return;
208+
}
209+
205210
// Select which path to use for the GenMC repo:
206211
let(genmc_path, always_configure) = ifletSome(genmc_src_path) = option_env!("GENMC_SRC_PATH")
207212
{

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Commit eeb4431

Browse files
authored
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 cdddb85 + ff2acf0 commit eeb4431

47 files changed

Lines changed: 745 additions & 379 deletions

Some content is hidden

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

‎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-
exportCARGO_EXTRA_FLAGS="$CARGO_EXTRA_FLAGS --all-features"
40-
time ./miri build # the build that all the `./miri test` below will use
40+
exportFEATURES="--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
timeforFILEin 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$UNIXtime 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
fnmain(){
205+
// For check-only builds, we don't need to do anything.
206+
ifcfg!(feature = "check_only"){
207+
return;
208+
}
209+
205210
// Select which path to use for the GenMC repo:
206211
let(genmc_path, always_configure) = ifletSome(genmc_src_path) = option_env!("GENMC_SRC_PATH")
207212
{

0 commit comments

Comments
 (0)