You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let local = 0usize;let leak_this = Box::new(&local as*constusize);Box::into_raw(leak_this);
Running cargo miri run produces the following output:
The following memory was leaked: alloc1673 (Rust heap, size: 8, align: 8) {
╾0x28970[a1657]<3157>─╼ │ ╾──────╼
}
alloc1657 (deallocated)
It is not immediately clear why alloc1657 is shown or the relation between alloc1673 and alloc1657. If alloc1657 were not deallocated it would be possible to interpret alloc1657 as leaked memory.
One suggestion would be to explicitly mention that the leaked memory contains alloc1657 and expand a1657 to alloc1657 for clarity.
The following memory was leaked: alloc1673 (Rust heap, size: 8, align: 8) {
╾0x28970[alloc1657]<3157>─╼ │ ╾──────╼
}
alloc1673 contains a pointer: alloc1657 (deallocated)