Skip to content

Commit 0b92233

Browse files
committed
Adjust aarch64 error
1 parent aabdb23 commit 0b92233

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

crash-handler/src/linux/state.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::{Error, Signal};
2-
use std::{mem, ops::DerefMut, ptr};
2+
use std::{mem, ptr};
33

44
// std::cmp::max is not const :(
55
const 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

minidumper-test/src/lib.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff 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(

0 commit comments

Comments
 (0)