Skip to content

Commit

Permalink
Allow _Unwind_RaiseException with MinGW
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Jul 1, 2024
1 parent 45b0f68 commit 239f813
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tools/miri/src/shims/unix/foreign_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
// For arm32 they did something custom, but similar enough that the same
// `_Unwind_RaiseException` impl in miri should work:
// https://github.com/ARM-software/abi-aa/blob/main/ehabi32/ehabi32.rst
if !matches!(&*this.tcx.sess.target.os, "linux" | "freebsd" | "illumos" | "solaris" | "android" | "macos") {
// MinGW implements _Unwind_RaiseException on top of SEH exceptions.
if !matches!(&*this.tcx.sess.target.os, "linux" | "freebsd" | "illumos" | "solaris" | "android" | "macos")
&& !(this.tcx.sess.target.os == "windows" && this.tcx.sess.target.env == "gnu") {
throw_unsup_format!(
"`_Unwind_RaiseException` is not supported on {}",
this.tcx.sess.target.os
Expand Down

0 comments on commit 239f813

Please sign in to comment.