Skip to content

Commit 7671890

Browse files
committed
Auto merge of #3736 - rust-lang:rustup-2024-07-06, r=RalfJung
Automatic Rustup
2 parents d018cf1 + b52b5df commit 7671890

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
51917ba8f215f76e9d3fa8e77cd0a781bb28dab7
1+
51917e2e69702e5752bce6a4f3bfd285d0f4ae39

src/shims/windows/foreign_items.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,22 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
758758
this.write_null(dest)?;
759759
}
760760

761+
"_Unwind_RaiseException" => {
762+
// This is not formally part of POSIX, but it is very wide-spread on POSIX systems.
763+
// It was originally specified as part of the Itanium C++ ABI:
764+
// https://itanium-cxx-abi.github.io/cxx-abi/abi-eh.html#base-throw.
765+
// MinGW implements _Unwind_RaiseException on top of SEH exceptions.
766+
if this.tcx.sess.target.env != "gnu" {
767+
throw_unsup_format!(
768+
"`_Unwind_RaiseException` is not supported on non-MinGW Windows",
769+
);
770+
}
771+
// This function looks and behaves excatly like miri_start_unwind.
772+
let [payload] = this.check_shim(abi, Abi::C { unwind: true }, link_name, args)?;
773+
this.handle_miri_start_unwind(payload)?;
774+
return Ok(EmulateItemResult::NeedsUnwind);
775+
}
776+
761777
_ => return Ok(EmulateItemResult::NotSupported),
762778
}
763779

0 commit comments

Comments
 (0)