From d30141693ef9e4add781cdfa0c5b880192489f26 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 23 Apr 2019 21:59:33 +0200 Subject: [PATCH 1/2] bump Rust --- rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-version b/rust-version index fae9b1d599a..52b6685715d 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -9224be5fa39f6170f6e046342976efee5453a1ff +fe0a415b4ba3310c2263f07e0253e2434310299c From 53f59431a5f2c16b8a6dd66d91008c97a4ed8884 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 27 Apr 2019 18:21:10 +0200 Subject: [PATCH 2/2] fix HeapFree return value --- src/fn_call.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fn_call.rs b/src/fn_call.rs index 29a34a69686..1fd10ff3850 100644 --- a/src/fn_call.rs +++ b/src/fn_call.rs @@ -722,6 +722,7 @@ pub trait EvalContextExt<'a, 'mir, 'tcx: 'a + 'mir>: crate::MiriEvalContextExt<' // Windows API stubs. // HANDLE = isize // DWORD = ULONG = u32 + // BOOL = i32 "GetProcessHeap" => { // Just fake a HANDLE this.write_scalar(Scalar::from_int(1, this.pointer_size()), dest)?; @@ -739,6 +740,7 @@ pub trait EvalContextExt<'a, 'mir, 'tcx: 'a + 'mir>: crate::MiriEvalContextExt<' let _flags = this.read_scalar(args[1])?.to_u32()?; let ptr = this.read_scalar(args[2])?.not_undef()?; this.free(ptr)?; + this.write_scalar(Scalar::from_int(1, Size::from_bytes(4)), dest)?; } "HeapReAlloc" => { let _handle = this.read_scalar(args[0])?.to_isize(this)?;