@@ -40,8 +40,16 @@ Miri has already discovered some [real-world bugs](#bugs-found-by-miri). If you
40
40
found a bug with Miri, we'd appreciate if you tell us and we'll add it to the
41
41
list!
42
42
43
- However, be aware that Miri will ** not catch all cases of undefined behavior**
44
- in your program, and cannot run all programs:
43
+ By default, Miri ensures a fully deterministic execution and isolates the
44
+ program from the host system. Some APIs that would usually access the host, such
45
+ as gathering entropy for random number generators, environment variables, and
46
+ clocks, are replaced by deterministic "fake" implementations. Set
47
+ ` MIRIFLAGS="-Zmiri-disable-isolation" ` to access the real system APIs instead.
48
+ (In particular, the "fake" system RNG APIs make Miri ** not suited for
49
+ cryptographic use** ! Do not generate keys using Miri.)
50
+
51
+ All that said, be aware that Miri will ** not catch all cases of undefined
52
+ behavior** in your program, and cannot run all programs:
45
53
46
54
* There are still plenty of open questions around the basic invariants for some
47
55
types and when these invariants even have to hold. Miri tries to avoid false
@@ -306,9 +314,7 @@ environment variable. We first document the most relevant and most commonly used
306
314
RNG is used to pick base addresses for allocations, to determine preemption and failure of
307
315
` compare_exchange_weak` , and to control store buffering for weak memory emulation. When isolation
308
316
is enabled (the default), this is also used to emulate system entropy. The default seed is 0. You
309
- can increase test coverage by running Miri multiple times with different seeds. **NOTE** : This
310
- entropy is not good enough for cryptographic use! Do not generate secret keys in Miri or perform
311
- other kinds of cryptographic operations that rely on proper random numbers.
317
+ can increase test coverage by running Miri multiple times with different seeds.
312
318
* `-Zmiri-strict-provenance` enables [strict
313
319
provenance](https://github.com/rust-lang/rust/issues/95228) checking in Miri. This means that
314
320
casting an integer to a pointer yields a result with 'invalid' provenance, i.e., with provenance
0 commit comments