@@ -12,30 +12,32 @@ for example:
12
12
* Violation of intrinsic preconditions (an [ ` unreachable_unchecked ` ] being
13
13
reached, calling [ ` copy_nonoverlapping ` ] with overlapping ranges, ...)
14
14
* Not sufficiently aligned memory accesses and references
15
- * Violation of basic type invariants (a ` bool ` that is not 0 or 1, for example,
15
+ * Violation of * some * basic type invariants (a ` bool ` that is not 0 or 1, for example,
16
16
or an invalid enum discriminant)
17
17
* WIP: Violations of the rules governing aliasing for reference types
18
18
19
19
Miri has already discovered some [ real-world bugs] ( #bugs-found-by-miri ) . If you
20
20
found a bug with Miri, we'd appreciate if you tell us and we'll add it to the
21
21
list!
22
22
23
- Be aware that Miri will not catch all possible errors in your program, and
24
- cannot run all programs:
23
+ Be aware that Miri will not catch all cases of undefined behavior in your
24
+ program, and cannot run all programs:
25
25
26
26
* There are still plenty of open questions around the basic invariants for some
27
27
types and when these invariants even have to hold. Miri tries to avoid false
28
28
positives here, so if you program runs fine in Miri right now that is by no
29
- means a guarantee that it is UB-free when these questions get answered. In
30
- particular, Miri does currently not check that integers are initialized or
31
- that references point to valid data.
29
+ means a guarantee that it is UB-free when these questions get answered.
30
+
31
+ In particular, Miri does currently not check that integers are initialized
32
+ or that references point to valid data.
32
33
* If the program relies on unspecified details of how data is laid out, it will
33
34
still run fine in Miri -- but might break (including causing UB) on different
34
35
compiler versions or different platforms.
35
- * Miri is fully deterministic and does not actually pick a base address in
36
- virtual memory for the program's allocations. If program behavior depends on
37
- the base address of an allocation, Miri will stop execution (with a few
38
- exceptions to make some common pointer comparisons work).
36
+ * Program execution is non-deterministic when it depends, for example, on where
37
+ exactly in memory allocations end up. Miri tests one of many possible
38
+ executions of your program. If your code is sensitive to allocation base
39
+ addresses or other non-deterministic data, try running Miri with different
40
+ values for ` -Zmiri-seed ` to test different executions.
39
41
* Miri runs the program as a platform-independent interpreter, so the program
40
42
has no access to any platform-specific APIs or FFI. A few APIs have been
41
43
implemented (such as printing to stdout) but most have not: for example, Miri
0 commit comments