Skip to content

Commit 143e0f1

Browse files
StrophoxRalfJung
andauthored
Comment src/tools/miri/src/alloc_addresses/mod.rs
Co-authored-by: Ralf Jung <post@ralfj.de>
1 parent e546c43 commit 143e0f1

File tree

1 file changed

+1
-1
lines changed
  • src/tools/miri/src/alloc_addresses

1 file changed

+1
-1
lines changed

src/tools/miri/src/alloc_addresses/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
194194
// Allocate some dummy memory to get a unique address for this function/vtable.
195195
let alloc_bytes = MiriAllocBytes::from_bytes(&[0u8; 1], Align::from_bytes(1).unwrap());
196196
let addr = alloc_bytes.as_ptr().addr().try_into().unwrap();
197-
// Leak this.
197+
// Leak the underlying memory to ensure it remains unique.
198198
std::mem::forget(alloc_bytes);
199199
addr
200200
}

0 commit comments

Comments
 (0)