@@ -146,9 +146,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
146
146
}
147
147
// Allocate environment block & Store environment variables to environment block.
148
148
// 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.
152
150
let envblock_ptr = this. alloc_os_str_as_wide_str ( & env_vars, MiriMemoryKind :: WinHeap . into ( ) ) ;
153
151
// If the function succeeds, the return value is a pointer to the environment block of the current process.
154
152
Ok ( envblock_ptr. into ( ) )
@@ -160,9 +158,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
160
158
this. assert_target_os ( "windows" , "FreeEnvironmentStringsW" ) ;
161
159
162
160
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.
166
162
let result = this. memory . deallocate ( this. force_ptr ( env_block_ptr) ?, None , MiriMemoryKind :: WinHeap . into ( ) ) ;
167
163
// If the function succeeds, the return value is nonzero.
168
164
Ok ( result. is_ok ( ) as i32 )
0 commit comments