Skip to content

Commit 6d4040f

Browse files
committed
document fake handles
1 parent 63673cd commit 6d4040f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/shims/windows/foreign_items.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
330330
// We just make this the identity function, so we know later in `NtWriteFile` which
331331
// one it is. This is very fake, but libtest needs it so we cannot make it a
332332
// std-only shim.
333+
// FIXME: this should return real HANDLEs when io support is added
333334
this.write_scalar(Scalar::from_machine_isize(which.into(), this), dest)?;
334335
}
335336
"CloseHandle" => {
@@ -372,6 +373,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
372373
"GetProcessHeap" if this.frame_in_std() => {
373374
let [] = this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
374375
// Just fake a HANDLE
376+
// It's fine to not use the Handle type here because its a stub
375377
this.write_scalar(Scalar::from_machine_isize(1, this), dest)?;
376378
}
377379
"GetModuleHandleA" if this.frame_in_std() => {

0 commit comments

Comments
 (0)