Skip to content

Commit

Permalink
Auto merge of #127360 - GuillaumeGomez:rollup-f0zs1qr, r=GuillaumeGomez
Browse files Browse the repository at this point in the history
Rollup of 7 pull requests

Successful merges:

 - #124290 (DependencyList: removed outdated comment)
 - #126709 (Migrate `include_bytes_deps`, `optimization-remarks-dir-pgo`, `optimization-remarks-dir`, `issue-40535` and `rmeta-preferred` `run-make` tests to rmake)
 - #127214 (Use the native unwind function in miri where possible)
 - #127320 (Update windows-bindgen to 0.58.0)
 - #127349 (Tweak `-1 as usize` suggestion)
 - #127352 (coverage: Rename `mir::coverage::BranchInfo` to `CoverageInfoHi`)
 - #127359 (Improve run make llvm ident code)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Jul 5, 2024
2 parents 1656be9 + f01cc63 commit e2b1f40
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/shims/windows/foreign_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,22 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
this.write_null(dest)?;
}

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

_ => return Ok(EmulateItemResult::NotSupported),
}

Expand Down

0 comments on commit e2b1f40

Please sign in to comment.