7 fn miri_get_alloc_id(ptr: *const u8) -> u64;
8 fn miri_print_stacks(alloc_id: u64);
12 let ptr = unsafe { alloc::alloc(Layout::new::<u8>()) };
13 let alloc_id = unsafe { miri_get_alloc_id(ptr) };
14 unsafe { miri_print_stacks(alloc_id) };
16 assert!(!ptr.is_null());
17 unsafe { miri_print_stacks(alloc_id) };
20 unsafe { miri_print_stacks(alloc_id) };
22 let _b = unsafe { ManuallyDrop::new(Box::from_raw(ptr)) };
23 unsafe { miri_print_stacks(alloc_id) };
25 let _ptr = unsafe { &*ptr };
26 unsafe { miri_print_stacks(alloc_id) };
28 unsafe { alloc::dealloc(ptr, Layout::new::<u8>()) };