| error: Undefined Behavior: memory access failed: ALLOC has been freed, so this pointer is dangling |
| --> $DIR/mmap_use_after_munmap.rs:LL:CC |
| | |
| LL | let _x = *(ptr as *mut u8); |
| | ^^^^^^^^^^^^^^^^^ memory access failed: ALLOC has been freed, so this pointer is dangling |
| | |
| = 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/mmap_use_after_munmap.rs:LL:CC |
| | |
| LL | let ptr = libc::mmap( |
| | ___________________^ |
| LL | | std::ptr::null_mut(), |
| LL | | 4096, |
| LL | | libc::PROT_READ | libc::PROT_WRITE, |
| ... | |
| LL | | 0, |
| LL | | ); |
| | |_________^ |
| help: ALLOC was deallocated here: |
| --> $DIR/mmap_use_after_munmap.rs:LL:CC |
| | |
| LL | libc::munmap(ptr, 4096); |
| | ^^^^^^^^^^^^^^^^^^^^^^^ |
| = note: BACKTRACE (of the first span): |
| = note: inside `main` at $DIR/mmap_use_after_munmap.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 |
| |