Skip to content

Commit d1e72d0

Browse files
author
hyd-dev
committed
Check argument count for CreateThread
1 parent 89c722a commit d1e72d0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/shims/windows/foreign_items.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -342,11 +342,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
342342

343343
// Better error for attempts to create a thread
344344
"CreateThread" => {
345-
this.check_abi_and_shim_symbol_clash(
346-
abi,
347-
Abi::System { unwind: false },
348-
link_name_sym,
349-
)?;
345+
let &[_, _, _, _, _, _] =
346+
this.check_shim(abi, Abi::System { unwind: false }, link_name_sym, args)?;
350347

351348
this.handle_unsupported("can't create threads on Windows")?;
352349
return Ok(EmulateByNameResult::AlreadyJumped);

0 commit comments

Comments
 (0)