Skip to content
Merged

rustup #2190

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c35035cefc709abddabfb28ecc6a326458d46ce2
4e725bad73747a4c93a3ac53106e4b4006edc665
1 change: 1 addition & 0 deletions src/shims/windows/dlsym.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
})
Expand Down
4 changes: 4 additions & 0 deletions src/shims/windows/foreign_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
Expand Down