diff --git a/src/mac/streams/module_list.rs b/src/mac/streams/module_list.rs index dfc8fe6e..4cb958da 100644 --- a/src/mac/streams/module_list.rs +++ b/src/mac/streams/module_list.rs @@ -344,14 +344,6 @@ mod test { /// both the local and intra-process scenarios #[test] fn images_match() { - if std::env::var_os("CI").is_some() && cfg!(target_arch = "aarch64") { - // https://github.com/rust-minidump/minidump-writer/issues/101 - println!( - "this fails on github actions but works on a local aarch64-apple-darwin machine..." - ); - return; - } - let mdw = MinidumpWriter::new(None, None); let td = TaskDumper::new(mdw.task); diff --git a/src/mac/task_dumper.rs b/src/mac/task_dumper.rs index e479ee45..0798801a 100644 --- a/src/mac/task_dumper.rs +++ b/src/mac/task_dumper.rs @@ -104,6 +104,12 @@ pub struct VMRegionInfo { pub range: std::ops::Range, } +impl VMRegionInfo { + fn is_readable(&self) -> bool { + self.info.protection & mach2::vm_prot::VM_PROT_READ != 0 + } +} + /// Similarly to PtraceDumper for Linux, this provides access to information /// for a task (MacOS process) pub struct TaskDumper { @@ -205,7 +211,7 @@ impl TaskDumper { if size_to_end < 4 * 1024 { let maybe_adjacent = self.get_vm_region(region.range.end)?; - if maybe_adjacent.range.start == region.range.end { + if maybe_adjacent.range.start == region.range.end && maybe_adjacent.is_readable() { size_to_end += maybe_adjacent.range.end - maybe_adjacent.range.start; } }