]> git.lizzy.rs Git - rust.git/commitdiff
rustup; fix Windows env var memory type
authorRalf Jung <post@ralfj.de>
Mon, 30 Mar 2020 20:13:53 +0000 (22:13 +0200)
committerRalf Jung <post@ralfj.de>
Mon, 30 Mar 2020 20:13:53 +0000 (22:13 +0200)
rust-version
src/shims/env.rs

index 4f4cff76583b25389dc7fc4ab1e7e8665eafc101..a812b46de17f62fd4b5e17e5a1e8b37a6b8cb36f 100644 (file)
@@ -1 +1 @@
-8926bb497d9b127eb318aea5aed0e745d8381591
+9a12971da5c08f9a95d54bdaef5cd83698ed4509
index 76d1de5d9a649df61dc4bce093307f7280102d4e..d30e953cf56a138b3be9b885ecd9d185df4affe5 100644 (file)
@@ -165,8 +165,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 `Env`, 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());
+        let envblock_ptr = this.alloc_os_str_as_wide_str(&env_vars, MiriMemoryKind::Env.into());
         // If the function succeeds, the return value is a pointer to the environment block of the current process.
         Ok(envblock_ptr.into())
     }
@@ -177,8 +176,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 `Env`, 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());
+        let result = this.memory.deallocate(this.force_ptr(env_block_ptr)?, None, MiriMemoryKind::Env.into());
         // If the function succeeds, the return value is nonzero.
         Ok(result.is_ok() as i32)
     }