Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
5b71113
re-balance CI
RalfJung Sep 3, 2025
a880c46
no need to run GC_STRESS more than once for each OS
RalfJung Sep 3, 2025
f0c9c38
Merge pull request #4562 from RalfJung/ci
RalfJung Sep 3, 2025
d366f26
Extract address generator struct from memory allocator.
Patrick-6 Apr 14, 2025
c1be740
Implement basic support for running Miri with GenMC.
Patrick-6 Apr 14, 2025
ddd0cef
Merge pull request #4506 from Patrick-6/miri-genmc-mvp
RalfJung Sep 3, 2025
d9619ed
Prepare for merging from rust-lang/rust
Sep 4, 2025
94e40cd
Merge ref '9385c64c95d9' from rust-lang/rust
Sep 4, 2025
a460ec7
Merge pull request #4564 from rust-lang/rustup-2025-09-04
RalfJung Sep 4, 2025
9a1eb85
Prepare for merging from rust-lang/rust
Sep 5, 2025
7c5fdb0
Merge ref 'b3cfb8faf84c' from rust-lang/rust
Sep 5, 2025
37f9c7d
Merge pull request #4567 from rust-lang/rustup-2025-09-05
RalfJung Sep 5, 2025
5cadd45
make use of Duration::from_nanos_u128
RalfJung Sep 5, 2025
3a16bbc
Merge pull request #4568 from RalfJung/duration-from-nanos
RalfJung Sep 5, 2025
1186db8
atomics: unify handling min/max and the other RMWs
RalfJung Sep 5, 2025
0dcc21b
Merge pull request #4569 from RalfJung/atomic-rmw
RalfJung Sep 5, 2025
69c7652
atomic rmw intrinsics: RHS must be an integer
RalfJung Sep 5, 2025
d5b4324
Merge pull request #4570 from RalfJung/atomic-rmw-int
RalfJung Sep 5, 2025
61af5da
Implement more features for GenMC mode
Patrick-6 Mar 14, 2025
344b4ac
print proper error when using unsupported synchronization primitive w…
RalfJung Sep 8, 2025
211461a
Merge pull request #4566 from Patrick-6/miri-genmc-rmw
RalfJung Sep 8, 2025
deca489
Prepare for merging from rust-lang/rust
RalfJung Sep 8, 2025
c4d1268
Merge ref 'a09fbe2c8372' from rust-lang/rust
RalfJung Sep 8, 2025
24ce839
clippy
RalfJung Sep 8, 2025
3430751
Merge pull request #4573 from RalfJung/rustup
RalfJung Sep 8, 2025
94ab2b9
move math intrinsics to their own file
RalfJung Jul 19, 2025
e000512
extract core operation name instead of listing all function name vari…
RalfJung Jul 19, 2025
84e1950
move math foreign_items into their own file
RalfJung Jul 19, 2025
943aa93
Merge pull request #4484 from RalfJung/math-shims
RalfJung Sep 8, 2025
edbc0a0
weak memory tests: add more info on where they come from
RalfJung Sep 10, 2025
0e0b254
ensure we do not see the inconsistent execution from Figure 8
RalfJung Sep 10, 2025
21e3111
refactor weak-mem test to list all expected executions
RalfJung Sep 10, 2025
655b847
also use nicer check_all_outcomes in float_nan
RalfJung Sep 10, 2025
827a654
move all weak memory tests into their folder
RalfJung Sep 10, 2025
7d5413b
this apparently needs more test rounds
RalfJung Sep 10, 2025
f8302a7
add release sequence test
RalfJung Sep 10, 2025
52fb371
Merge pull request #4575 from RalfJung/weakmem-origin
RalfJung Sep 10, 2025
68bff8c
Prepare for merging from rust-lang/rust
Sep 11, 2025
3790e37
Merge ref 'f4665ab8368a' from rust-lang/rust
Sep 11, 2025
906bfe9
Merge pull request #4576 from rust-lang/rustup-2025-09-11
RalfJung Sep 11, 2025
ad6004d
add release sequence test
RalfJung Sep 11, 2025
24d195b
weak_memory: fix sync clock handling when loading from old store elem…
RalfJung Sep 11, 2025
2b5b191
Fix miri issue 4579 by checking if the strong protector is actually "…
JoJoDeveloping Sep 11, 2025
166af83
Merge pull request #4577 from RalfJung/release-seq
RalfJung Sep 11, 2025
16b34c6
move zero-sized protector dealloc test
JoJoDeveloping Sep 11, 2025
36376bc
Merge pull request #4580 from JoJoDeveloping/fix-4579-protector-0sized
RalfJung Sep 11, 2025
44edbc6
Prepare for merging from rust-lang/rust
Sep 12, 2025
7bc4a3b
Merge ref '2a9bacf61876' from rust-lang/rust
Sep 12, 2025
8b5335c
disable broken parts of CI for now
RalfJung Sep 12, 2025
25b2a7d
Merge pull request #4581 from rust-lang/rustup-2025-09-12
RalfJung Sep 12, 2025
225e8ff
move _Unwind_RaiseException out of the frame_in_std section
RalfJung Sep 12, 2025
260dd6f
make a basic hello world work on wasip2
RalfJung Sep 12, 2025
a70d78a
Implement more features for GenMC mode
Patrick-6 Mar 14, 2025
af16b80
Merge pull request #4582 from RalfJung/wasip2-helloworld
RalfJung Sep 12, 2025
fc7eb3c
Merge pull request #4578 from Patrick-6/miri-genmc-cas
RalfJung Sep 12, 2025
ae57f08
Prepare for merging from rust-lang/rust
Sep 13, 2025
520e45a
Merge ref '4ba1cf9ade4c' from rust-lang/rust
Sep 13, 2025
8ade141
Merge pull request #4584 from rust-lang/rustup-2025-09-13
oli-obk Sep 13, 2025
3a784d9
Prepare for merging from rust-lang/rust
Sep 14, 2025
603341a
Merge ref 'a015919e54c6' from rust-lang/rust
Sep 14, 2025
0c1e9aa
Merge pull request #4585 from rust-lang/rustup-2025-09-14
oli-obk Sep 14, 2025
d23909d
rustup
RalfJung Sep 16, 2025
4b35fed
Merge pull request #4588 from RalfJung/rustup
RalfJung Sep 16, 2025
06e8810
Prepare for merging from rust-lang/rust
Sep 17, 2025
1672251
Merge ref '3f1552a273e4' from rust-lang/rust
Sep 17, 2025
9e8e4af
Merge pull request #4590 from rust-lang/rustup-2025-09-17
oli-obk Sep 17, 2025
9cdc09b
readdir for freebsd
LorrensP-2158466 Sep 16, 2025
19b9676
Merge pull request #4589 from LorrensP-2158466/freebsd-readdir
RalfJung Sep 17, 2025
2c1f1f0
Add GenMC estimation mode. Improve error handling and output printing.
Patrick-6 Sep 8, 2025
00bfe9c
tweak genmc error report note
RalfJung Sep 18, 2025
045e5e3
Merge pull request #4583 from Patrick-6/miri-genmc-estimation
RalfJung Sep 18, 2025
f19b560
implement sqrt for f16 and f128
RalfJung Sep 18, 2025
77f2d86
share sqrt implemention across float types
RalfJung Sep 18, 2025
11ffdb5
Merge pull request #4592 from RalfJung/sqrt
RalfJung Sep 18, 2025
7af6e59
update lockfile
RalfJung Sep 18, 2025
1db74d4
fix miri bootstrap build
RalfJung Sep 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 22 additions & 15 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81"
dependencies = [
"serde",
"termcolor",
"unicode-width 0.1.14",
"unicode-width 0.2.1",
]

[[package]]
Expand Down Expand Up @@ -937,23 +937,24 @@ dependencies = [

[[package]]
name = "cxx"
version = "1.0.168"
version = "1.0.185"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7aa144b12f11741f0dab5b4182896afad46faa0598b6a061f7b9d17a21837ba7"
checksum = "2f81de88da10862f22b5b3a60f18f6f42bbe7cb8faa24845dd7b1e4e22190e77"
dependencies = [
"cc",
"cxx-build",
"cxxbridge-cmd",
"cxxbridge-flags",
"cxxbridge-macro",
"foldhash",
"foldhash 0.2.0",
"link-cplusplus",
]

[[package]]
name = "cxx-build"
version = "1.0.168"
version = "1.0.185"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12d3cbb84fb003242941c231b45ca9417e786e66e94baa39584bd99df3a270b6"
checksum = "5edd58bf75c3fdfc80d79806403af626570662f7b6cc782a7fabe156166bd6d6"
dependencies = [
"cc",
"codespan-reporting",
Expand All @@ -966,9 +967,9 @@ dependencies = [

[[package]]
name = "cxxbridge-cmd"
version = "1.0.168"
version = "1.0.185"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fa36b7b249d43f67a3f54bd65788e35e7afe64bbc671396387a48b3e8aaea94"
checksum = "fd46bf2b541a4e0c2d5abba76607379ee05d68e714868e3cb406dc8d591ce2d2"
dependencies = [
"clap",
"codespan-reporting",
Expand All @@ -980,15 +981,15 @@ dependencies = [

[[package]]
name = "cxxbridge-flags"
version = "1.0.168"
version = "1.0.185"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77707c70f6563edc5429618ca34a07241b75ebab35bd01d46697c75d58f8ddfe"
checksum = "2c79b68f6a3a8f809d39b38ae8af61305a6113819b19b262643b9c21353b92d9"

[[package]]
name = "cxxbridge-macro"
version = "1.0.168"
version = "1.0.185"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ede6c0fb7e318f0a11799b86ee29dcf17b9be2960bd379a6c38e1a96a6010fff"
checksum = "862b7fdb048ff9ef0779a0d0a03affd09746c4c875543746b640756be9cff2af"
dependencies = [
"indexmap",
"proc-macro2",
Expand Down Expand Up @@ -1388,6 +1389,12 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"

[[package]]
name = "foldhash"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"

[[package]]
name = "form_urlencoded"
version = "1.2.1"
Expand Down Expand Up @@ -1567,7 +1574,7 @@ checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
dependencies = [
"allocator-api2",
"equivalent",
"foldhash",
"foldhash 0.1.5",
"serde",
]

Expand Down Expand Up @@ -2160,9 +2167,9 @@ dependencies = [

[[package]]
name = "link-cplusplus"
version = "1.0.10"
version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a6f6da007f968f9def0d65a05b187e2960183de70c160204ecfccf0ee330212"
checksum = "7f78c730aaa7d0b9336a299029ea49f9ee53b0ed06e9202e8cb7db9bae7b8c82"
dependencies = [
"cc",
]
Expand Down
33 changes: 17 additions & 16 deletions src/tools/miri/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,22 @@ jobs:
os: ubuntu-24.04-arm
multiarch: armhf
gcc_cross: arm-linux-gnueabihf
- host_target: riscv64gc-unknown-linux-gnu
os: ubuntu-latest
multiarch: riscv64
gcc_cross: riscv64-linux-gnu
qemu: true
- host_target: s390x-unknown-linux-gnu
os: ubuntu-latest
multiarch: s390x
gcc_cross: s390x-linux-gnu
qemu: true
- host_target: powerpc64le-unknown-linux-gnu
os: ubuntu-latest
multiarch: ppc64el
gcc_cross: powerpc64le-linux-gnu
qemu: true
# Disabled due to Ubuntu repo trouble
# - host_target: riscv64gc-unknown-linux-gnu
# os: ubuntu-latest
# multiarch: riscv64
# gcc_cross: riscv64-linux-gnu
# qemu: true
# - host_target: s390x-unknown-linux-gnu
# os: ubuntu-latest
# multiarch: s390x
# gcc_cross: s390x-linux-gnu
# qemu: true
# - host_target: powerpc64le-unknown-linux-gnu
# os: ubuntu-latest
# multiarch: ppc64el
# gcc_cross: powerpc64le-linux-gnu
# qemu: true
- host_target: aarch64-apple-darwin
os: macos-latest
- host_target: i686-pc-windows-msvc
Expand All @@ -67,7 +68,7 @@ jobs:
- name: install multiarch
if: ${{ matrix.multiarch != '' }}
run: |
# s390x, ppc64el need Ubuntu Ports to be in the mirror list
# s390x, ppc64el, riscv64 need Ubuntu Ports to be in the mirror list
sudo bash -c "echo 'https://ports.ubuntu.com/ priority:4' >> /etc/apt/apt-mirrors.txt"
# Add architecture
sudo dpkg --add-architecture ${{ matrix.multiarch }}
Expand Down
24 changes: 12 additions & 12 deletions src/tools/miri/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,9 @@ dependencies = [

[[package]]
name = "cxx"
version = "1.0.161"
version = "1.0.173"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3523cc02ad831111491dd64b27ad999f1ae189986728e477604e61b81f828df"
checksum = "6c64ed3da1c337cbaae7223cdcff8b4dddf698d188cd3eaddd1116f6b0295950"
dependencies = [
"cc",
"cxxbridge-cmd",
Expand All @@ -377,9 +377,9 @@ dependencies = [

[[package]]
name = "cxx-build"
version = "1.0.161"
version = "1.0.173"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "212b754247a6f07b10fa626628c157593f0abf640a3dd04cce2760eca970f909"
checksum = "ae0a26a75a05551f5ae3d75b3557543d06682284eaa7419113162d602cb45766"
dependencies = [
"cc",
"codespan-reporting",
Expand All @@ -392,9 +392,9 @@ dependencies = [

[[package]]
name = "cxxbridge-cmd"
version = "1.0.161"
version = "1.0.173"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f426a20413ec2e742520ba6837c9324b55ffac24ead47491a6e29f933c5b135a"
checksum = "952d408b6002b7db4b36da07c682a9cbb34f2db0efa03e976ae50a388414e16c"
dependencies = [
"clap",
"codespan-reporting",
Expand All @@ -406,15 +406,15 @@ dependencies = [

[[package]]
name = "cxxbridge-flags"
version = "1.0.161"
version = "1.0.173"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a258b6069020b4e5da6415df94a50ee4f586a6c38b037a180e940a43d06a070d"
checksum = "ccbd201b471c75c6abb6321cace706d1982d270e308b891c11a3262d320f5265"

[[package]]
name = "cxxbridge-macro"
version = "1.0.161"
version = "1.0.173"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8dec184b52be5008d6eaf7e62fc1802caf1ad1227d11b3b7df2c409c7ffc3f4"
checksum = "2bea8b915bbc4cb4288f242aa7ca18b23ecc6965e4d6e7c1b07905e3fe2e0c41"
dependencies = [
"indexmap",
"proc-macro2",
Expand Down Expand Up @@ -501,9 +501,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"

[[package]]
name = "foldhash"
version = "0.1.5"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"

[[package]]
name = "form_urlencoded"
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ harness = false

[features]
default = ["stack-cache", "native-lib"]
genmc = ["dep:genmc-sys"] # this enables a GPL dependency!
genmc = ["dep:genmc-sys"]
stack-cache = []
stack-cache-consistency-check = ["stack-cache"]
tracing = ["serde_json"]
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ degree documented below):
- `solaris` / `illumos`: maintained by @devnexen. Supports the entire test suite.
- `freebsd`: maintained by @YohDeadfall and @LorrensP-2158466. Supports the entire test suite.
- `android`: **maintainer wanted**. Support very incomplete, but a basic "hello world" works.
- `wasi`: **maintainer wanted**. Support very incomplete, not even standard output works, but an empty `main` function works.
- `wasi`: **maintainer wanted**. Support very incomplete, but a basic "hello world" works.
- For targets on other operating systems, Miri might fail before even reaching the `main` function.

However, even for targets that we do support, the degree of support for accessing platform APIs
Expand Down
21 changes: 10 additions & 11 deletions src/tools/miri/ci/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ function run_tests_minimal {

# In particular, fully cover all tier 1 targets.
# We also want to run the many-seeds tests on all tier 1 targets.
# We run GC_STRESS only once for each tier 1 OS.
case $HOST_TARGET in
x86_64-unknown-linux-gnu)
# Host
Expand All @@ -147,29 +148,31 @@ case $HOST_TARGET in
;;
i686-unknown-linux-gnu)
# Host
# Without GC_STRESS as this is a slow runner.
MIR_OPT=1 MANY_SEEDS=64 TEST_BENCH=1 CARGO_MIRI_ENV=1 run_tests
# Partially supported targets (tier 2)
BASIC="empty_main integer heap_alloc libc-mem vec string btreemap" # ensures we have the basics: pre-main code, system allocator
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
TEST_TARGET=aarch64-linux-android run_tests_minimal $BASIC $UNIX time hashmap random thread sync concurrency epoll eventfd
TEST_TARGET=wasm32-wasip2 run_tests_minimal $BASIC wasm
TEST_TARGET=wasm32-wasip2 run_tests_minimal $BASIC hello wasm
TEST_TARGET=wasm32-unknown-unknown run_tests_minimal no_std empty_main wasm # this target doesn't really have std
TEST_TARGET=thumbv7em-none-eabihf run_tests_minimal no_std
;;
aarch64-unknown-linux-gnu)
# Host
GC_STRESS=1 MIR_OPT=1 MANY_SEEDS=64 TEST_BENCH=1 CARGO_MIRI_ENV=1 run_tests
MIR_OPT=1 MANY_SEEDS=64 TEST_BENCH=1 CARGO_MIRI_ENV=1 run_tests
# Extra tier 2
MANY_SEEDS=16 TEST_TARGET=arm-unknown-linux-gnueabi run_tests # 32bit ARM
MANY_SEEDS=16 TEST_TARGET=aarch64-pc-windows-gnullvm run_tests # gnullvm ABI
MANY_SEEDS=16 TEST_TARGET=s390x-unknown-linux-gnu run_tests # big-endian architecture of choice
# Custom target JSON file
TEST_TARGET=tests/x86_64-unknown-kernel.json MIRI_NO_STD=1 run_tests_minimal no_std
# Not officially supported tier 2
MANY_SEEDS=16 TEST_TARGET=x86_64-unknown-freebsd run_tests
MANY_SEEDS=16 TEST_TARGET=i686-unknown-freebsd run_tests
;;
armv7-unknown-linux-gnueabihf)
# Host
GC_STRESS=1 MIR_OPT=1 MANY_SEEDS=64 TEST_BENCH=1 CARGO_MIRI_ENV=1 run_tests
MIR_OPT=1 MANY_SEEDS=64 TEST_BENCH=1 CARGO_MIRI_ENV=1 run_tests
# Custom target JSON file
TEST_TARGET=tests/x86_64-unknown-kernel.json MIRI_NO_STD=1 run_tests_minimal no_std
;;
aarch64-apple-darwin)
# Host
Expand All @@ -181,12 +184,9 @@ case $HOST_TARGET in
MANY_SEEDS=16 TEST_TARGET=mips-unknown-linux-gnu run_tests # a 32bit big-endian target, and also a target without 64bit atomics
MANY_SEEDS=16 TEST_TARGET=x86_64-unknown-illumos run_tests
MANY_SEEDS=16 TEST_TARGET=x86_64-pc-solaris run_tests
MANY_SEEDS=16 TEST_TARGET=x86_64-unknown-freebsd run_tests
MANY_SEEDS=16 TEST_TARGET=i686-unknown-freebsd run_tests
;;
i686-pc-windows-msvc)
# Host
# Without GC_STRESS as this is a very slow runner.
MIR_OPT=1 MANY_SEEDS=64 TEST_BENCH=1 run_tests
# Extra tier 1
# We really want to ensure a Linux target works on a Windows host,
Expand All @@ -195,8 +195,7 @@ case $HOST_TARGET in
;;
aarch64-pc-windows-msvc)
# Host
# Without GC_STRESS as this is a very slow runner.
MIR_OPT=1 MANY_SEEDS=64 TEST_BENCH=1 CARGO_MIRI_ENV=1 run_tests
GC_STRESS=1 MIR_OPT=1 MANY_SEEDS=64 TEST_BENCH=1 CARGO_MIRI_ENV=1 run_tests
# Extra tier 1
MANY_SEEDS=64 TEST_TARGET=i686-unknown-linux-gnu run_tests
;;
Expand Down
38 changes: 34 additions & 4 deletions src/tools/miri/doc/genmc.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ Miri-GenMC integrates that model checker into Miri.

## Usage

**IMPORTANT: The license of GenMC and thus the `genmc-sys` crate in the Miri repo is currently "GPL-3.0-or-later", so a binary produced with the `genmc` feature is subject to the requirements of the GPL. As long as that remains the case, the `genmc` feature of Miri is OFF-BY-DEFAULT and must be OFF for all Miri releases.**

For testing/developing Miri-GenMC (while keeping in mind the licensing issues):
For testing/developing Miri-GenMC:
- clone the Miri repo.
- build Miri-GenMC with `./miri build --features=genmc`.
- OR: install Miri-GenMC in the current system with `./miri install --features=genmc`
Expand All @@ -21,7 +19,30 @@ Basic usage:
MIRIFLAGS="-Zmiri-genmc" cargo miri run
```

<!-- FIXME(genmc): explain options. -->
Note that `cargo miri test` in GenMC mode is currently not supported.

### Supported Parameters

- `-Zmiri-genmc`: Enable GenMC mode (not required if any other GenMC options are used).
- `-Zmiri-genmc-estimate`: This enables estimation of the concurrent execution space and verification time, before running the full verification. This should help users detect when their program is too complex to fully verify in a reasonable time. This will explore enough executions to make a good estimation, but at least 10 and at most `estimation-max` executions.
- `-Zmiri-genmc-estimation-max={MAX_ITERATIONS}`: Set the maximum number of executions that will be explored during estimation (default: 1000).
- `-Zmiri-genmc-print-exec-graphs={none,explored,blocked,all}`: Make GenMC print the execution graph of the program after every explored, every blocked, or after every execution (default: None).
- `-Zmiri-genmc-print-exec-graphs`: Shorthand for suffix `=explored`.
- `-Zmiri-genmc-print-genmc-output`: Print the output that GenMC provides. NOTE: this output is quite verbose and the events in the printed execution graph are hard to map back to the Rust code location they originate from.
- `-Zmiri-genmc-log=LOG_LEVEL`: Change the log level for GenMC. Default: `warning`.
- `quiet`: Disable logging.
- `error`: Print errors.
- `warning`: Print errors and warnings.
- `tip`: Print errors, warnings and tips.
- If Miri is built with debug assertions, there are additional log levels available (downgraded to `tip` without debug assertions):
- `debug1`: Print revisits considered by GenMC.
- `debug2`: Print the execution graph after every memory access.
- `debug3`: Print reads-from values considered by GenMC.
- `-Zmiri-genmc-verbose`: Show more information, such as estimated number of executions, and time taken for verification.

#### Regular Miri parameters useful for GenMC mode

- `-Zmiri-disable-weak-memory-emulation`: Disable any weak memory effects (effectively upgrading all atomic orderings in the program to `SeqCst`). This option may reduce the number of explored program executions, but any bugs related to weak memory effects will be missed. This option can help determine if an error is caused by weak memory effects (i.e., if it disappears with this option enabled).

<!-- FIXME(genmc): explain Miri-GenMC specific functions. -->

Expand Down Expand Up @@ -57,6 +78,15 @@ The process for obtaining them is as follows:
If you place this directory inside the Miri folder, it is recommended to call it `genmc-src` as that tells `./miri fmt` to avoid
formatting the Rust files inside that folder.

### Formatting the C++ code

For formatting the C++ code we provide a `.clang-format` file in the `genmc-sys` directory.
With `clang-format` installed, run this command to format the c++ files (replace the `-i` with `--dry-run` to just see the changes.):
```
find ./genmc-sys/cpp/ -name "*.cpp" -o -name "*.hpp" | xargs clang-format --style=file:"./genmc-sys/.clang-format" -i
```
NOTE: this is currently not done automatically on pull requests to Miri.

<!-- FIXME(genmc): explain how submitting code to GenMC should be handled. -->

<!-- FIXME(genmc): explain development. -->
Loading
Loading