1
- # Miri [[ slides ] ( https://solson.me/miri-slides.pdf )] [[ report ] ( https://solson.me/miri-report.pdf )] [ ![ Build Status] ( https://travis-ci.org/solson/miri.svg?branch=master )] ( https://travis-ci.org/solson/miri ) [ ![ Windows build status] ( https://ci.appveyor.com/api/projects/status/github/solson/miri?svg=true )] ( https://ci.appveyor.com/project/solson63299/miri )
1
+ # Miri [ ![ Build Status] ( https://travis-ci.org/solson/miri.svg?branch=master )] ( https://travis-ci.org/solson/miri ) [ ![ Windows build status] ( https://ci.appveyor.com/api/projects/status/github/solson/miri?svg=true )] ( https://ci.appveyor.com/project/solson63299/miri )
2
2
3
3
4
- An experimental interpreter for [ Rust] [ rust ] 's [ mid-level intermediate
5
- representation] [ mir ] (MIR). This project began as part of my work for the
6
- undergraduate research course at the [ University of Saskatchewan] [ usask ] .
4
+ An experimental interpreter for [ Rust] [ rust ] 's
5
+ [ mid-level intermediate representation] [ mir ] (MIR). It can run binaries and
6
+ test suites of cargo projects and detect certain classes of undefined behavior,
7
+ for example:
8
+
9
+ * Out-of-bounds memory accesses and use-after-free
10
+ * Invalid use of uninitialized data
11
+ * Violation of intrinsic preconditions (an [ ` unreachable_unchecked ` ] being
12
+ reached, calling [ ` copy_nonoverlapping ` ] with overlapping ranges, ...)
13
+ * Not sufficiently aligned memory accesses and references
14
+ * Violation of basic type invariants (a ` bool ` that is not 0 or 1, for example,
15
+ or an invalid enum discriminant)
16
+ * WIP: Violations of the rules governing aliasing for reference types
17
+
18
+ [ rust ] : https://www.rust-lang.org/
19
+ [ mir ] : https://github.com/rust-lang/rfcs/blob/master/text/1211-mir.md
20
+ [ `unreachable_unchecked` ] : https://doc.rust-lang.org/stable/std/hint/fn.unreachable_unchecked.html
21
+ [ `copy_nonoverlapping` ] : https://doc.rust-lang.org/stable/std/ptr/fn.copy_nonoverlapping.html
7
22
8
23
## Building Miri
9
24
10
- We recommend that you install [ rustup] [ rustup ] to obtain Rust. Then all you have
25
+ We recommend that you install [ rustup] to obtain Rust. Then all you have
11
26
to do is:
12
27
13
28
``` sh
@@ -25,6 +40,8 @@ To avoid repeating the nightly version all the time, you can use
25
40
which means ` nightly ` Rust will automatically be used whenever you are working
26
41
in this directory.
27
42
43
+ [ rustup ] : https://www.rustup.rs
44
+
28
45
## Running Miri
29
46
30
47
``` sh
@@ -175,6 +192,26 @@ needs to be done that I haven't documented in the issues yet, however. For more
175
192
ideas or help with running or hacking on Miri, you can contact me (` scott ` ) on
176
193
Mozilla IRC in any of the Rust IRC channels (` #rust ` , ` #rust-offtopic ` , etc).
177
194
195
+ ## History
196
+
197
+ This project began as part of an undergraduate research course in 2015 by
198
+ @solson at the [ University of Saskatchewan] [ usask ] . There are [ slides] and a
199
+ [ report] available from that project. In 2016, @oli-obk joined to prepare miri
200
+ for eventually being used as const evaluator in the Rust compiler itself
201
+ (basically, for ` const ` and ` static ` stuff), replacing the old evaluator that
202
+ worked directly on the AST. In 2017, @RalfJung did an internship with Mozilla
203
+ and began developing miri towards a tool for detecting undefined behavior, and
204
+ also using miri as a way to explore the consequences of various possible
205
+ definitions for undefined behavior in Rust. @oli-obk 's move of the miri engine
206
+ into the compiler finally came to completion in early 2018. Meanwhile, later
207
+ that year, @RalfJung did a second internship, developing miri further with
208
+ support for checking basic type invariants and verifying that references are
209
+ used according to their aliasing restrictions.
210
+
211
+ [ usask ] : https://www.usask.ca/
212
+ [ slides ] : https://solson.me/miri-slides.pdf
213
+ [ report ] : https://solson.me/miri-report.pdf
214
+
178
215
## License
179
216
180
217
Licensed under either of
@@ -188,8 +225,3 @@ Licensed under either of
188
225
Unless you explicitly state otherwise, any contribution intentionally submitted
189
226
for inclusion in the work by you shall be dual licensed as above, without any
190
227
additional terms or conditions.
191
-
192
- [ rust ] : https://www.rust-lang.org/
193
- [ mir ] : https://github.com/rust-lang/rfcs/blob/master/text/1211-mir.md
194
- [ usask ] : https://www.usask.ca/
195
- [ rustup ] : https://www.rustup.rs
0 commit comments