@@ -160,14 +160,14 @@ Certain parts of the execution are picked randomly by Miri, such as the exact ba
160160allocations are stored at and the interleaving of concurrently executing threads. Sometimes, it can
161161be useful to explore multiple different execution, e.g. to make sure that your code does not depend
162162on incidental "super-alignment" of new allocations and to test different thread interleavings.
163- This can be done with the ` --many-seeds ` flag:
163+ This can be done with the ` -Zmiri -many-seeds ` flag:
164164
165165```
166- cargo miri test - -many-seeds # tries the seeds in 0..64
167- cargo miri test - -many-seeds=0..16
166+ MIRIFLAGS="-Zmiri -many-seeds" cargo miri test # tries the seeds in 0..64
167+ MIRIFLAGS="-Zmiri -many-seeds=0..16" cargo miri test
168168```
169169
170- The default of 64 different seeds is quite slow, so you probably want to specify a smaller range.
170+ The default of 64 different seeds can be quite slow, so you often want to specify a smaller range.
171171
172172### Running Miri on CI
173173
@@ -294,9 +294,10 @@ environment variable. We first document the most relevant and most commonly used
294294 will always fail and `0.0` means it will never fail. Note that setting it to
295295 ` 1.0` will likely cause hangs, since it means programs using
296296 ` compare_exchange_weak` cannot make progress.
297- * `-Zmiri-disable-isolation` disables host isolation. As a consequence,
297+ * `-Zmiri-disable-isolation` disables host isolation. As a consequence,
298298 the program has access to host resources such as environment variables, file
299299 systems, and randomness.
300+ This overwrites a previous `-Zmiri-isolation-error`.
300301* `-Zmiri-disable-leak-backtraces` disables backtraces reports for memory leaks. By default, a
301302 backtrace is captured for every allocation when it is created, just in case it leaks. This incurs
302303 some memory overhead to store data that is almost never used. This flag is implied by
@@ -317,6 +318,15 @@ environment variable. We first document the most relevant and most commonly used
317318 execution with a "permission denied" error being returned to the program.
318319 ` warn` prints a full backtrace each time that happens; `warn-nobacktrace` is less
319320 verbose and shown at most once per operation. `hide` hides the warning entirely.
321+ This overwrites a previous `-Zmiri-disable-isolation`.
322+ * `-Zmiri-many-seeds=[<from>]..<to>` runs the program multiple times with different seeds for Miri's
323+ RNG. With different seeds, Miri will make different choices to resolve non-determinism such as the
324+ order in which concurrent threads are scheduled, or the exact addresses assigned to allocations.
325+ This is useful to find bugs that only occur under particular interleavings of concurrent threads,
326+ or that otherwise depend on non-determinism. If the `<from>` part is skipped, it defaults to `0`.
327+ Can be used without a value; in that case the range defaults to `0..64`.
328+ * `-Zmiri-many-seeds-keep-going` tells Miri to really try all the seeds in the given range, even if
329+ a failing seed has already been found. This is useful to determine which fraction of seeds fails.
320330* `-Zmiri-num-cpus` states the number of available CPUs to be reported by miri. By default, the
321331 number of available CPUs is `1`. Note that this flag does not affect how miri handles threads in
322332 any way.
@@ -339,8 +349,8 @@ environment variable. We first document the most relevant and most commonly used
339349 can increase test coverage by running Miri multiple times with different seeds.
340350* `-Zmiri-strict-provenance` enables [strict
341351 provenance](https://github.com/rust-lang/rust/issues/95228) checking in Miri. This means that
342- casting an integer to a pointer yields a result with 'invalid' provenance, i.e., with provenance
343- that cannot be used for any memory access .
352+ casting an integer to a pointer will stop execution because the provenance of the pointer
353+ cannot be determined .
344354* `-Zmiri-symbolic-alignment-check` makes the alignment check more strict. By default, alignment is
345355 checked by casting the pointer to an integer, and making sure that is a multiple of the alignment.
346356 This can lead to cases where a program passes the alignment check by pure chance, because things
@@ -429,6 +439,8 @@ to Miri failing to detect cases of undefined behavior in a program.
429439 of Rust will be stricter than Tree Borrows. In other words, if you use Tree Borrows,
430440 even if your code is accepted today, it might be declared UB in the future.
431441 This is much less likely with Stacked Borrows.
442+ Using Tree Borrows currently implies `-Zmiri-strict-provenance` because integer-to-pointer
443+ casts are not supported in this mode, but that may change in the future.
432444* `-Zmiri-force-page-size=<num>` overrides the default page size for an architecture, in multiples of 1k.
433445 ` 4` is default for most targets. This value should always be a power of 2 and nonzero.
434446* `-Zmiri-unique-is-unique` performs additional aliasing checks for `core::ptr::Unique` to ensure
0 commit comments