summaryrefslogtreecommitdiffstats
path: root/third_party/rust/minidump-writer/src/mac
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /third_party/rust/minidump-writer/src/mac
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/minidump-writer/src/mac')
-rw-r--r--third_party/rust/minidump-writer/src/mac/mach.rs3
-rw-r--r--third_party/rust/minidump-writer/src/mac/streams/exception.rs8
-rw-r--r--third_party/rust/minidump-writer/src/mac/streams/module_list.rs8
-rw-r--r--third_party/rust/minidump-writer/src/mac/streams/thread_names.rs4
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, "")?
}
};