@@ -328,37 +328,9 @@ pub fn dur2timeout(dur: Duration) -> u32 {
328328 . unwrap_or ( c:: INFINITE )
329329}
330330
331- /// Use `__fastfail` to abort the process
332- ///
333- /// In Windows 8 and later, this will terminate the process immediately without
334- /// running any in-process exception handlers. In earlier versions of Windows,
335- /// this sequence of instructions will be treated as an access violation, which
336- /// will still terminate the process but might run some exception handlers.
337- ///
338- /// https://docs.microsoft.com/en-us/cpp/intrinsics/fastfail
339- #[ cfg( not( miri) ) ] // inline assembly does not work in Miri
340- pub fn abort_internal ( ) -> ! {
341- unsafe {
342- cfg_select ! {
343- any( target_arch = "x86" , target_arch = "x86_64" ) => {
344- core:: arch:: asm!( "int $$0x29" , in( "ecx" ) c:: FAST_FAIL_FATAL_APP_EXIT , options( noreturn, nostack) ) ;
345- }
346- all( target_arch = "arm" , target_feature = "thumb-mode" ) => {
347- core:: arch:: asm!( ".inst 0xDEFB" , in( "r0" ) c:: FAST_FAIL_FATAL_APP_EXIT , options( noreturn, nostack) ) ;
348- }
349- any( target_arch = "aarch64" , target_arch = "arm64ec" ) => {
350- core:: arch:: asm!( "brk 0xF003" , in( "x0" ) c:: FAST_FAIL_FATAL_APP_EXIT , options( noreturn, nostack) ) ;
351- }
352- _ => {
353- core:: intrinsics:: abort( ) ;
354- }
355- }
356- }
357- }
358-
359- #[ cfg( miri) ]
360- #[ track_caller] // even without panics, this helps for Miri backtraces
331+ #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
361332pub fn abort_internal ( ) -> ! {
333+ // Use `__fastfail` to abort the process
362334 crate :: intrinsics:: abort ( ) ;
363335}
364336
0 commit comments