| error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[RANGE], but that tag does not exist in the borrow stack for this location |
| --> tests/fail/both_borrows/box-custom-alloc-aliasing.rs:LL:CC |
| | |
| LL | let thread_id = ptr::read(ptr::addr_of!((*their_bin).thread_id)); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this error occurs as part of an access at ALLOC[RANGE] |
| | |
| = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental |
| = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information |
| help: <TAG> was created by a Unique retag at offsets [RANGE] |
| --> tests/fail/both_borrows/box-custom-alloc-aliasing.rs:LL:CC |
| | |
| LL | (Box::new_in([t], a) as Box<[T], A>).into_vec() |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| = note: stack backtrace: |
| 0: <MyAllocator as std::alloc::Allocator>::deallocate |
| at tests/fail/both_borrows/box-custom-alloc-aliasing.rs:LL:CC |
| 1: <&MyAllocator as std::alloc::Allocator>::deallocate |
| at RUSTLIB/core/src/alloc/mod.rs:LL:CC |
| 2: alloc::raw_vec::RawVecInner::<&MyAllocator>::deallocate |
| at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC |
| 3: <alloc::raw_vec::RawVec<usize, &MyAllocator> as std::ops::Drop>::drop |
| at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC |
| 4: std::ptr::drop_glue::<alloc::raw_vec::RawVec<usize, &MyAllocator>> - shim(Some(alloc::raw_vec::RawVec<usize, &MyAllocator>)) |
| at RUSTLIB/core/src/ptr/mod.rs:LL:CC |
| 5: std::ptr::drop_glue::<std::vec::Vec<usize, &MyAllocator>> - shim(Some(std::vec::Vec<usize, &MyAllocator>)) |
| at RUSTLIB/core/src/ptr/mod.rs:LL:CC |
| 6: std::ptr::drop_glue::<(std::vec::Vec<usize, &MyAllocator>, std::vec::Vec<usize, &MyAllocator>)> - shim(Some((std::vec::Vec<usize, &MyAllocator>, std::vec::Vec<usize, &MyAllocator>))) |
| at RUSTLIB/core/src/ptr/mod.rs:LL:CC |
| 7: std::mem::drop::<(std::vec::Vec<usize, &MyAllocator>, std::vec::Vec<usize, &MyAllocator>)> |
| at RUSTLIB/core/src/mem/mod.rs:LL:CC |
| 8: main |
| at tests/fail/both_borrows/box-custom-alloc-aliasing.rs:LL:CC |
| |
| note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace |
| |
| error: aborting due to 1 previous error |
| |