Auto merge of #2190 - RalfJung:rustup, r=RalfJung

rustup

Cc https://github.com/rust-lang/rust/issues/97745
This commit is contained in:
bors 2022-06-04 23:44:29 +00:00
commit 5a1b09eb9f
3 changed files with 6 additions and 1 deletions

View File

@ -1 +1 @@
c35035cefc709abddabfb28ecc6a326458d46ce2
4e725bad73747a4c93a3ac53106e4b4006edc665

View File

@ -18,6 +18,7 @@ impl Dlsym {
pub fn from_str<'tcx>(name: &str) -> InterpResult<'tcx, Option<Dlsym>> {
Ok(match name {
"GetSystemTimePreciseAsFileTime" => None,
"SetThreadDescription" => None,
"NtWriteFile" => Some(Dlsym::NtWriteFile),
_ => throw_unsup_format!("unsupported Windows dlsym: {}", name),
})

View File

@ -415,6 +415,10 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
// There is only one thread, so this always succeeds and returns TRUE.
this.write_scalar(Scalar::from_i32(1), dest)?;
}
"GetCurrentThread" if this.frame_in_std() => {
let [] = this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
this.write_scalar(Scalar::from_machine_isize(1, this), dest)?;
}
_ => return Ok(EmulateByNameResult::NotSupported),
}