|
| 1 | +error: Undefined Behavior: deallocation through <TAG> at ALLOC[0x0] is forbidden |
| 2 | + --> RUSTLIB/alloc/src/boxed.rs:LL:CC |
| 3 | + | |
| 4 | +LL | self.1.deallocate(From::from(ptr.cast()), layout); |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here |
| 6 | + | |
| 7 | + = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental |
| 8 | + = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information |
| 9 | + = help: the allocation of the accessed tag <TAG> also contains the strongly protected tag <TAG> |
| 10 | + = help: the strongly protected tag <TAG> disallows deallocations |
| 11 | +help: the accessed tag <TAG> was created here |
| 12 | + --> tests/fail/both_borrows/closure-captured-ref.rs:LL:CC |
| 13 | + | |
| 14 | +LL | drop(unsafe { Box::from_raw(p) }); |
| 15 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 16 | +help: the strongly protected tag <TAG> was created here, in the initial state Reserved |
| 17 | + --> tests/fail/both_borrows/closure-captured-ref.rs:LL:CC |
| 18 | + | |
| 19 | +LL | invoke(move || { |
| 20 | + | ____________^ |
| 21 | +LL | | drop(unsafe { Box::from_raw(p) }); |
| 22 | +LL | | }); |
| 23 | + | |_____^ |
| 24 | + = note: stack backtrace: |
| 25 | + 0: <std::boxed::Box<i32> as std::ops::Drop>::drop |
| 26 | + at RUSTLIB/alloc/src/boxed.rs:LL:CC |
| 27 | + 1: std::ptr::drop_glue::<std::boxed::Box<i32>> - shim(Some(std::boxed::Box<i32>)) |
| 28 | + at RUSTLIB/core/src/ptr/mod.rs:LL:CC |
| 29 | + 2: std::mem::drop::<std::boxed::Box<i32>> |
| 30 | + at RUSTLIB/core/src/mem/mod.rs:LL:CC |
| 31 | + 3: main::{closure#0} |
| 32 | + at tests/fail/both_borrows/closure-captured-ref.rs:LL:CC |
| 33 | + 4: main::invoke::<{closure@tests/fail/both_borrows/closure-captured-ref.rs:LL:CC}> |
| 34 | + at tests/fail/both_borrows/closure-captured-ref.rs:LL:CC |
| 35 | + 5: main |
| 36 | + at tests/fail/both_borrows/closure-captured-ref.rs:LL:CC |
| 37 | + |
| 38 | +note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace |
| 39 | + |
| 40 | +error: aborting due to 1 previous error |
| 41 | + |
0 commit comments