]> git.lizzy.rs Git - rust.git/commitdiff
adjust MemoryKind comment
authorRalf Jung <post@ralfj.de>
Fri, 27 Mar 2020 19:36:18 +0000 (20:36 +0100)
committerGitHub <noreply@github.com>
Fri, 27 Mar 2020 19:36:18 +0000 (20:36 +0100)
src/shims/env.rs

index b6d7010263788fd52b7b37adf09d41b2248ae316..ed689b1f4272bbad5568d9623e6b5e755595c9f6 100644 (file)
@@ -146,9 +146,7 @@ fn GetEnvironmentStringsW(&mut self) -> InterpResult<'tcx, Scalar<Tag>> {
         }
         // Allocate environment block & Store environment variables to environment block.
         // Final null terminator(block terminator) is added by `alloc_os_str_to_wide_str`.
-        // FIXME: MemoryKind should be `MiMemoryKind::Machine`,
-        //        but using it results in a Stacked Borrows error when running MIRI on 'tests/run-pass/env.rs'
-        //        For now, use `MiriMemoryKind::WinHeap` instead.
+        // FIXME: MemoryKind should be `Machine`, blocked on https://github.com/rust-lang/rust/pull/70479.
         let envblock_ptr = this.alloc_os_str_as_wide_str(&env_vars, MiriMemoryKind::WinHeap.into());
         // If the function succeeds, the return value is a pointer to the environment block of the current process.
         Ok(envblock_ptr.into())
@@ -160,9 +158,7 @@ fn FreeEnvironmentStringsW(&mut self, env_block_op: OpTy<'tcx, Tag>) -> InterpRe
         this.assert_target_os("windows", "FreeEnvironmentStringsW");
 
         let env_block_ptr = this.read_scalar(env_block_op)?.not_undef()?;
-        // FIXME: MemoryKind should be `MiMemoryKind::Machine`,
-        //        but using it results in a Stacked Borrows error when running MIRI on 'tests/run-pass/env.rs'
-        //        For now, use `MiriMemoryKind::WinHeap` instead.
+        // FIXME: MemoryKind should be `Machine`, blocked on https://github.com/rust-lang/rust/pull/70479.
         let result = this.memory.deallocate(this.force_ptr(env_block_ptr)?, None, MiriMemoryKind::WinHeap.into());
         // If the function succeeds, the return value is nonzero.
         Ok(result.is_ok() as i32)