diff options
Diffstat (limited to 'third_party/rust/minidump-writer/src/mac')
4 files changed, 17 insertions, 6 deletions
diff --git a/third_party/rust/minidump-writer/src/mac/mach.rs b/third_party/rust/minidump-writer/src/mac/mach.rs index f95211dc64..9b0179fad4 100644 --- a/third_party/rust/minidump-writer/src/mac/mach.rs +++ b/third_party/rust/minidump-writer/src/mac/mach.rs @@ -590,7 +590,8 @@ pub fn sysctl_by_name<T: Sized + Default>(name: &[u8]) -> T { 0, ) != 0 { - // log? + // TODO convert to ascii characters when logging? + log::warn!("failed to get sysctl for {name:?}"); T::default() } else { out diff --git a/third_party/rust/minidump-writer/src/mac/streams/exception.rs b/third_party/rust/minidump-writer/src/mac/streams/exception.rs index e594dd8d95..7dd7f8fae4 100644 --- a/third_party/rust/minidump-writer/src/mac/streams/exception.rs +++ b/third_party/rust/minidump-writer/src/mac/streams/exception.rs @@ -69,9 +69,11 @@ impl MinidumpWriter { } else { // For all other exceptions types, the value in the code // _should_ never exceed 32 bits, crashpad does an actual - // range check here, but since we don't really log anything - // else at the moment I'll punt that for now - // TODO: log/do something if exc.code > u32::MAX + // range check here. + if code > u32::MAX.into() { + // TODO: do something more than logging? + log::warn!("exception code {code:#018x} exceeds the expected 32 bits"); + } code as u32 }; diff --git a/third_party/rust/minidump-writer/src/mac/streams/module_list.rs b/third_party/rust/minidump-writer/src/mac/streams/module_list.rs index 2b4d13ea74..d1307c80a8 100644 --- a/third_party/rust/minidump-writer/src/mac/streams/module_list.rs +++ b/third_party/rust/minidump-writer/src/mac/streams/module_list.rs @@ -344,6 +344,14 @@ 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/third_party/rust/minidump-writer/src/mac/streams/thread_names.rs b/third_party/rust/minidump-writer/src/mac/streams/thread_names.rs index 42242a6397..016dd48eb8 100644 --- a/third_party/rust/minidump-writer/src/mac/streams/thread_names.rs +++ b/third_party/rust/minidump-writer/src/mac/streams/thread_names.rs @@ -25,8 +25,8 @@ impl MinidumpWriter { // not a critical failure let name_loc = match Self::write_thread_name(buffer, dumper, tid) { Ok(loc) => loc, - Err(_err) => { - // TODO: log error + Err(err) => { + log::warn!("failed to write thread name for thread {tid}: {err}"); write_string_to_location(buffer, "")? } }; |