Skip to content

Commit 579b3c4

Browse files
authored
adjust MemoryKind comment
1 parent ea836ee commit 579b3c4

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/shims/env.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
146146
}
147147
// Allocate environment block & Store environment variables to environment block.
148148
// Final null terminator(block terminator) is added by `alloc_os_str_to_wide_str`.
149-
// FIXME: MemoryKind should be `MiMemoryKind::Machine`,
150-
// but using it results in a Stacked Borrows error when running MIRI on 'tests/run-pass/env.rs'
151-
// For now, use `MiriMemoryKind::WinHeap` instead.
149+
// FIXME: MemoryKind should be `Machine`, blocked on https://github.com/rust-lang/rust/pull/70479.
152150
let envblock_ptr = this.alloc_os_str_as_wide_str(&env_vars, MiriMemoryKind::WinHeap.into());
153151
// If the function succeeds, the return value is a pointer to the environment block of the current process.
154152
Ok(envblock_ptr.into())
@@ -160,9 +158,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
160158
this.assert_target_os("windows", "FreeEnvironmentStringsW");
161159

162160
let env_block_ptr = this.read_scalar(env_block_op)?.not_undef()?;
163-
// FIXME: MemoryKind should be `MiMemoryKind::Machine`,
164-
// but using it results in a Stacked Borrows error when running MIRI on 'tests/run-pass/env.rs'
165-
// For now, use `MiriMemoryKind::WinHeap` instead.
161+
// FIXME: MemoryKind should be `Machine`, blocked on https://github.com/rust-lang/rust/pull/70479.
166162
let result = this.memory.deallocate(this.force_ptr(env_block_ptr)?, None, MiriMemoryKind::WinHeap.into());
167163
// If the function succeeds, the return value is nonzero.
168164
Ok(result.is_ok() as i32)

0 commit comments

Comments
 (0)