Skip to content

Commit 6a6c0cd

Browse files
committed
implement ExitProcess for Windows
1 parent d410b13 commit 6a6c0cd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/fn_call.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ pub trait EvalContextExt<'a, 'mir, 'tcx: 'a + 'mir>: crate::MiriEvalContextExt<'
7878
let code = this.read_scalar(args[0])?.to_i32()?;
7979
return err!(Exit(code));
8080
}
81+
"ExitProcess" => {
82+
let code = this.read_scalar(args[0])?.to_u32()?;
83+
return err!(Exit(code as i32));
84+
}
8185
_ => if dest.is_none() {
8286
return err!(Unimplemented(
8387
format!("can't call diverging foreign function: {}", link_name),

0 commit comments

Comments
 (0)