We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e546c43 commit 143e0f1Copy full SHA for 143e0f1
src/tools/miri/src/alloc_addresses/mod.rs
@@ -194,7 +194,7 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
194
// Allocate some dummy memory to get a unique address for this function/vtable.
195
let alloc_bytes = MiriAllocBytes::from_bytes(&[0u8; 1], Align::from_bytes(1).unwrap());
196
let addr = alloc_bytes.as_ptr().addr().try_into().unwrap();
197
- // Leak this.
+ // Leak the underlying memory to ensure it remains unique.
198
std::mem::forget(alloc_bytes);
199
addr
200
}
0 commit comments