File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ for example:
15
15
or an invalid enum discriminant)
16
16
* WIP: Violations of the rules governing aliasing for reference types
17
17
18
+ Miri has already discovered some [ real-world bugs] ( #bugs-found-by-miri ) .
19
+
18
20
[ rust ] : https://www.rust-lang.org/
19
21
[ mir ] : https://github.com/rust-lang/rfcs/blob/master/text/1211-mir.md
20
22
[ `unreachable_unchecked` ] : https://doc.rust-lang.org/stable/std/hint/fn.unreachable_unchecked.html
@@ -252,6 +254,18 @@ used according to their aliasing restrictions.
252
254
[ slides ] : https://solson.me/miri-slides.pdf
253
255
[ report ] : https://solson.me/miri-report.pdf
254
256
257
+ ## Bugs found by Miri
258
+
259
+ Miri has already found a number of bugs in the Rust standard library, which we collect here.
260
+
261
+ * [ ` Debug for vec_deque::Iter ` accessing uninitialized memory] ( https://github.com/rust-lang/rust/issues/53566 )
262
+ * [ ` From<&[T]> for Rc ` creating a not sufficiently aligned reference] ( https://github.com/rust-lang/rust/issues/54908 )
263
+ * [ ` BTreeMap ` creating a shared reference pointing to a too small allocation] ( https://github.com/rust-lang/rust/issues/54957 )
264
+ * [ ` VecDeque ` creating overlapping mutable references] ( https://github.com/rust-lang/rust/pull/56161 )
265
+ * [ Futures turning a shared reference into a mutable one] ( https://github.com/rust-lang/rust/pull/56319 )
266
+ * [ ` str ` turning a shared reference into a mutable one] ( https://github.com/rust-lang/rust/pull/58200 )
267
+ * [ ` BTreeMap ` creating mutable references that overlap with shared references] ( https://github.com/rust-lang/rust/pull/58431 )
268
+
255
269
## License
256
270
257
271
Licensed under either of
Original file line number Diff line number Diff line change @@ -9,6 +9,14 @@ fn main() {
9
9
let mut src = VecDeque :: new ( ) ;
10
10
src. push_front ( Box :: new ( 2 ) ) ;
11
11
dst. append ( & mut src) ;
12
+ for a in dst. iter ( ) {
13
+ assert_eq ! ( * * a, 2 ) ;
14
+ }
15
+
16
+ // Regression test for Debug and Diaplay impl's
17
+ println ! ( "{:?} {:?}" , dst, dst. iter( ) ) ;
18
+ println ! ( "{:?}" , VecDeque :: <u32 >:: new( ) . iter( ) ) ;
19
+
12
20
for a in dst {
13
21
assert_eq ! ( * a, 2 ) ;
14
22
}
Original file line number Diff line number Diff line change
1
+ [2, 2] Iter([2, 2], [])
2
+ Iter([], [])
You can’t perform that action at this time.
0 commit comments