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 40571e8 commit e546c43Copy full SHA for e546c43
src/tools/miri/src/alloc_addresses/mod.rs
@@ -191,6 +191,7 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
191
}
192
193
AllocKind::Function | AllocKind::VTable => {
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.
0 commit comments