Mark Mentovai has submitted this change and it was merged.
Change subject: mac: Handle EXC_RESOURCE RESOURCE_TYPE_IO
......................................................................
mac: Handle EXC_RESOURCE RESOURCE_TYPE_IO
RESOURCE_TYPE_IO always appears to be non-fatal based on disassembly of
the function responsible for sending it in xnu 3705.0.0.1.10 (10.12dp1
16A201w).
BUG=crashpad:120,crashpad:124
Change-Id: I9dcc6673f922cbd7af910b76991825a9d9c96fe6
Reviewed-on:
https://chromium-review.googlesource.com/355250
Reviewed-by: Robert Sesek <
rse...@chromium.org>
---
M compat/mac/kern/exc_resource.h
M util/mach/exception_types.cc
2 files changed, 20 insertions(+), 0 deletions(-)
Approvals:
Robert Sesek: Looks good to me, approved
diff --git a/compat/mac/kern/exc_resource.h b/compat/mac/kern/exc_resource.h
index 30e9b85..ca8943d 100644
--- a/compat/mac/kern/exc_resource.h
+++ b/compat/mac/kern/exc_resource.h
@@ -59,4 +59,18 @@
#define FLAVOR_CPU_MONITOR_FATAL 2
#endif
+// 10.12 SDK
+
+#ifndef RESOURCE_TYPE_IO
+#define RESOURCE_TYPE_IO 4
+#endif
+
+#ifndef FLAVOR_IO_PHYSICAL_WRITES
+#define FLAVOR_IO_PHYSICAL_WRITES 1
+#endif
+
+#ifndef FLAVOR_IO_LOGICAL_WRITES
+#define FLAVOR_IO_LOGICAL_WRITES 2
+#endif
+
#endif // CRASHPAD_COMPAT_MAC_KERN_EXC_RESOURCE_H_
diff --git a/util/mach/exception_types.cc b/util/mach/exception_types.cc
index 0199b31..cef90f9 100644
--- a/util/mach/exception_types.cc
+++ b/util/mach/exception_types.cc
@@ -201,6 +201,12 @@
return true;
}
+ if (resource_type == RESOURCE_TYPE_IO) {
+ // These exceptions don’t ever appear to be fatal. See
+ //
https://crashpad.chromium.org/bug/124.
+ return true;
+ }
+
// Treat unknown exceptions as fatal. This is the conservative approach:
it
// may result in more crash reports being generated, but the type-flavor
// combinations can be evaluated to determine appropriate handling.
Gerrit-MessageType: merged
Gerrit-Change-Id: I9dcc6673f922cbd7af910b76991825a9d9c96fe6
Gerrit-PatchSet: 3
Gerrit-Project: crashpad/crashpad
Gerrit-Branch: master
Gerrit-Owner: Mark Mentovai <
ma...@chromium.org>
Gerrit-Reviewer: Mark Mentovai <
ma...@chromium.org>
Gerrit-Reviewer: Robert Sesek <
rse...@chromium.org>