@@ -138,6 +138,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
138138 let result = this. GetUserProfileDirectoryW ( token, buf, size) ?;
139139 this. write_scalar ( result, dest) ?;
140140 }
141+ "GetCurrentProcessId" => {
142+ let [ ] = this. check_shim ( abi, Abi :: System { unwind : false } , link_name, args) ?;
143+ let result = this. GetCurrentProcessId ( ) ?;
144+ this. write_int ( result, dest) ?;
145+ }
141146
142147 // File related shims
143148 "NtWriteFile" => {
@@ -743,11 +748,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
743748 // Any non zero value works for the stdlib. This is just used for stack overflows anyway.
744749 this. write_int ( 1 , dest) ?;
745750 }
746- "GetCurrentProcessId" if this. frame_in_std ( ) => {
747- let [ ] = this. check_shim ( abi, Abi :: System { unwind : false } , link_name, args) ?;
748- let result = this. GetCurrentProcessId ( ) ?;
749- this. write_int ( result, dest) ?;
750- }
751751 // this is only callable from std because we know that std ignores the return value
752752 "SwitchToThread" if this. frame_in_std ( ) => {
753753 let [ ] = this. check_shim ( abi, Abi :: System { unwind : false } , link_name, args) ?;
0 commit comments