Skip to content

Commit 0f0c5f6

Browse files
authored
Merge pull request #716 from RalfJung/rustup
fix HeapFree return value
2 parents b46e523 + 53f5943 commit 0f0c5f6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9224be5fa39f6170f6e046342976efee5453a1ff
1+
fe0a415b4ba3310c2263f07e0253e2434310299c

src/fn_call.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,7 @@ pub trait EvalContextExt<'a, 'mir, 'tcx: 'a + 'mir>: crate::MiriEvalContextExt<'
722722
// Windows API stubs.
723723
// HANDLE = isize
724724
// DWORD = ULONG = u32
725+
// BOOL = i32
725726
"GetProcessHeap" => {
726727
// Just fake a HANDLE
727728
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<'
739740
let _flags = this.read_scalar(args[1])?.to_u32()?;
740741
let ptr = this.read_scalar(args[2])?.not_undef()?;
741742
this.free(ptr)?;
743+
this.write_scalar(Scalar::from_int(1, Size::from_bytes(4)), dest)?;
742744
}
743745
"HeapReAlloc" => {
744746
let _handle = this.read_scalar(args[0])?.to_isize(this)?;

0 commit comments

Comments
 (0)