Miri: Add CreateWaitableTimerEx stub

This function will always fail, allowing std's `Sleep` fallback path to be taken instead.
This commit is contained in:
Chris Denton 2023-10-06 01:16:36 +01:00
parent fca182b6a0
commit fbf256716e
No known key found for this signature in database
GPG Key ID: 713472F2F45627DE

View File

@ -267,6 +267,18 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
this.Sleep(timeout)?;
}
"CreateWaitableTimerExW" => {
let [attributes, name, flags, access] =
this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
this.read_pointer(attributes)?;
this.read_pointer(name)?;
this.read_scalar(flags)?.to_u32()?;
this.read_scalar(access)?.to_u32()?;
// Unimplemented. Always return failure.
let not_supported = this.eval_windows("c", "ERROR_NOT_SUPPORTED");
this.set_last_error(not_supported)?;
this.write_null(dest)?;
}
// Synchronization primitives
"AcquireSRWLockExclusive" => {