Rollup merge of #93300 - RalfJung:win-abort-miri, r=Amanieu

make Windows abort_internal Miri-compatible

https://github.com/rust-lang/rust/pull/92828 started calling `abort_internal` on double-panics, uncovering that on Windows this function does not work in Miri because of its use of inline assembly.

Cc `@Amanieu`
This commit is contained in:
Matthias Krüger 2022-01-25 23:06:03 +01:00 committed by GitHub
commit 04f915b332
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -285,6 +285,7 @@ pub fn dur2timeout(dur: Duration) -> c::DWORD {
#[allow(unreachable_code)]
pub fn abort_internal() -> ! {
const FAST_FAIL_FATAL_APP_EXIT: usize = 7;
#[cfg(not(miri))] // inline assembly does not work in Miri
unsafe {
cfg_if::cfg_if! {
if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {