We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent45b0f68 commite03c3b6Copy full SHA for e03c3b6
src/tools/miri/src/shims/windows/foreign_items.rs
@@ -758,6 +758,22 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
758
this.write_null(dest)?;
759
}
760
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
+returnOk(EmulateItemResult::NeedsUnwind);
775
776
+
777
_ =>returnOk(EmulateItemResult::NotSupported),
778
779