File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 11use crate :: { Error , Signal } ;
2- use std:: { mem, ops :: DerefMut , ptr} ;
2+ use std:: { mem, ptr} ;
33
44// std::cmp::max is not const :(
55const fn get_stack_size ( ) -> usize {
@@ -438,6 +438,8 @@ impl HandlerInner {
438438 let mut cc = CRASH_CONTEXT . lock ( ) ;
439439
440440 {
441+ use std:: ops:: DerefMut ;
442+ #[ allow( clippy:: explicit_deref_methods) ]
441443 ptr:: write_bytes ( cc. deref_mut ( ) , 0 , 1 ) ;
442444 debug_print ! ( "zeroed crashctx" ) ;
443445
Original file line number Diff line number Diff line change @@ -336,9 +336,15 @@ pub fn assert_minidump(md_buf: &[u8], signal: Signal) {
336336 ) ) ;
337337 }
338338 Signal :: Fpe => {
339- verify ! ( CrashReason :: LinuxSigfpe (
340- errors:: ExceptionCodeLinuxSigfpeKind :: FPE_INTDIV
341- ) ) ;
339+ cfg_if:: cfg_if! {
340+ if #[ cfg( not( any( target_arch = "aarch64" , target_arch = "arm" ) ) ) ] {
341+ verify!( CrashReason :: LinuxSigfpe (
342+ errors:: ExceptionCodeLinuxSigfpeKind :: FPE_INTDIV
343+ ) )
344+ } else {
345+ verify!( CrashReason :: LinuxGeneral ( errors:: ExceptionCodeLinux :: SIGFPE , 4294967290 ) ) ;
346+ }
347+ }
342348 }
343349 Signal :: Illegal => {
344350 verify ! ( CrashReason :: LinuxSigill (
You can’t perform that action at this time.
0 commit comments