Skip to content

Commit 95a842b

Browse files
authored
Merge pull request #666 from RalfJung/readme
explain Miri limitations
2 parents b06879c + 63b4a76 commit 95a842b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,26 @@ Miri has already discovered some [real-world bugs](#bugs-found-by-miri). If you
1919
found a bug with Miri, we'd appreciate if you tell us and we'll add it to the
2020
list!
2121

22+
Be aware that Miri will not catch all possible errors in your program, and
23+
cannot run all programs:
24+
25+
* There are still plenty of open questions around the basic invariants for some
26+
types and when these invariants even have to hold, so if you program runs fine
27+
in Miri right now that is by no means a guarantee that it is UB-free when
28+
these questions get answered.
29+
* If the program relies on unspecified details of how data is laid out, it will
30+
still run fine in Miri -- but might break (including causing UB) on different
31+
compiler versions or different platforms.
32+
* Miri is fully deterministic and does not actually pick a base address in
33+
virtual memory for the program's allocations. If program behavior depends on
34+
the base address of an allocation, Miri will stop execution (with a few
35+
exceptions to make some common pointer comparisons work).
36+
* Miri runs the program as a platform-independent interpreter, so the program
37+
has no access to any platform-specific APIs or FFI. A few APIs have been
38+
implemented (such as printing to stdout) but most have not: for example, Miri
39+
currently does not support concurrency, or networking, or file system access,
40+
or gathering entropy from the system.
41+
2242
[rust]: https://www.rust-lang.org/
2343
[mir]: https://github.com/rust-lang/rfcs/blob/master/text/1211-mir.md
2444
[`unreachable_unchecked`]: https://doc.rust-lang.org/stable/std/hint/fn.unreachable_unchecked.html

0 commit comments

Comments
 (0)