Merge pull request #716 from RalfJung/rustup

fix HeapFree return value
This commit is contained in:
Ralf Jung 2019-04-27 18:45:22 +02:00 committed by GitHub
commit 0f0c5f6d9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -1 +1 @@
9224be5fa39f6170f6e046342976efee5453a1ff
fe0a415b4ba3310c2263f07e0253e2434310299c

View File

@ -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)?;