bless miri

This commit is contained in:
Oli Scherer 2023-10-20 16:29:05 +00:00
parent 69c09ddb36
commit 6fa47e15e7

View File

@ -1,5 +1,5 @@
error: Undefined Behavior: memory access failed: ALLOC has been freed, so this pointer is dangling
--> $DIR/generator-pinned-moved.rs:LL:CC
--> $DIR/coroutine-pinned-moved.rs:LL:CC
|
LL | *num += 1;
| ^^^^^^^^^ memory access failed: ALLOC has been freed, so this pointer is dangling
@ -7,25 +7,25 @@ LL | *num += 1;
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
help: ALLOC was allocated here:
--> $DIR/generator-pinned-moved.rs:LL:CC
--> $DIR/coroutine-pinned-moved.rs:LL:CC
|
LL | let mut coroutine_iterator = Box::new(CoroutineIteratorAdapter(firstn()));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: ALLOC was deallocated here:
--> $DIR/generator-pinned-moved.rs:LL:CC
--> $DIR/coroutine-pinned-moved.rs:LL:CC
|
LL | }; // *deallocate* coroutine_iterator
| ^
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/generator-pinned-moved.rs:LL:CC
note: inside `<CoroutineIteratorAdapter<{static coroutine@$DIR/generator-pinned-moved.rs:LL:CC}> as std::iter::Iterator>::next`
--> $DIR/generator-pinned-moved.rs:LL:CC
= note: inside closure at $DIR/coroutine-pinned-moved.rs:LL:CC
note: inside `<CoroutineIteratorAdapter<{static coroutine@$DIR/coroutine-pinned-moved.rs:LL:CC}> as std::iter::Iterator>::next`
--> $DIR/coroutine-pinned-moved.rs:LL:CC
|
LL | match me.resume(()) {
| ^^^^^^^^^^^^^
= note: inside `<std::boxed::Box<CoroutineIteratorAdapter<{static coroutine@$DIR/generator-pinned-moved.rs:LL:CC}>> as std::iter::Iterator>::next` at RUSTLIB/alloc/src/boxed.rs:LL:CC
= note: inside `<std::boxed::Box<CoroutineIteratorAdapter<{static coroutine@$DIR/coroutine-pinned-moved.rs:LL:CC}>> as std::iter::Iterator>::next` at RUSTLIB/alloc/src/boxed.rs:LL:CC
note: inside `main`
--> $DIR/generator-pinned-moved.rs:LL:CC
--> $DIR/coroutine-pinned-moved.rs:LL:CC
|
LL | coroutine_iterator_2.next(); // and use moved value
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^