Check argument count for CreateThread

This commit is contained in:
hyd-dev 2021-06-14 23:01:06 +08:00
parent 89c722ac32
commit d1e72d0854
No known key found for this signature in database
GPG Key ID: 74FA7FD5B8DA14B8

View File

@ -342,11 +342,8 @@ fn emulate_foreign_item_by_name(
// Better error for attempts to create a thread
"CreateThread" => {
this.check_abi_and_shim_symbol_clash(
abi,
Abi::System { unwind: false },
link_name_sym,
)?;
let &[_, _, _, _, _, _] =
this.check_shim(abi, Abi::System { unwind: false }, link_name_sym, args)?;
this.handle_unsupported("can't create threads on Windows")?;
return Ok(EmulateByNameResult::AlreadyJumped);