Skip to content

Commit ee64d21

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

File tree

1 file changed

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

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
359359
fn get_global_alloc_bytes(&self, id: AllocId, kind: MemoryKind, bytes: &[u8], align: Align) -> InterpResult<'tcx, MiriAllocBytes> {
360360
let ecx = self.eval_context_ref();
361361
Ok(if ecx.machine.native_lib.is_some() {
362+
// In native lib mode, MiriAllocBytes for global allocations are handled via `prepared_alloc_bytes`.
362363
// This additional call ensures that some `MiriAllocBytes` are always prepared.
363364
ecx.addr_from_alloc_id(id, kind)?;
364365
let mut global_state = ecx.machine.alloc_addresses.borrow_mut();

0 commit comments

Comments
 (0)