Skip to content

Commit 04f915b

Browse files
authoredJan 25, 2022
Rollup merge of rust-lang#93300 - RalfJung:win-abort-miri, r=Amanieu
make Windows abort_internal Miri-compatible rust-lang#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`
2 parents b2c21ab + 53d2401 commit 04f915b

File tree

1 file changed

+1
-0
lines changed
  • library/std/src/sys/windows

1 file changed

+1
-0
lines changed
 

‎library/std/src/sys/windows/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ pub fn dur2timeout(dur: Duration) -> c::DWORD {
285285
#[allow(unreachable_code)]
286286
pub fn abort_internal() -> ! {
287287
const FAST_FAIL_FATAL_APP_EXIT: usize = 7;
288+
#[cfg(not(miri))] // inline assembly does not work in Miri
288289
unsafe {
289290
cfg_if::cfg_if! {
290291
if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {

0 commit comments

Comments
 (0)
Please sign in to comment.