Skip to content

Commit 239f813

Browse files
committed
Allow _Unwind_RaiseException with MinGW
1 parent 45b0f68 commit 239f813

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tools/miri/src/shims/unix/foreign_items.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
649649
// For arm32 they did something custom, but similar enough that the same
650650
// `_Unwind_RaiseException` impl in miri should work:
651651
// https://github.com/ARM-software/abi-aa/blob/main/ehabi32/ehabi32.rst
652-
if !matches!(&*this.tcx.sess.target.os, "linux" | "freebsd" | "illumos" | "solaris" | "android" | "macos") {
652+
// MinGW implements _Unwind_RaiseException on top of SEH exceptions.
653+
if !matches!(&*this.tcx.sess.target.os, "linux" | "freebsd" | "illumos" | "solaris" | "android" | "macos")
654+
&& !(this.tcx.sess.target.os == "windows" && this.tcx.sess.target.env == "gnu") {
653655
throw_unsup_format!(
654656
"`_Unwind_RaiseException` is not supported on {}",
655657
this.tcx.sess.target.os

0 commit comments

Comments
 (0)