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 <rsesek@chromium.org>
This commit is contained in:
Mark Mentovai 2016-06-22 19:47:11 -04:00
parent 89835b30f8
commit 3887d99e48
2 changed files with 20 additions and 0 deletions

View File

@ -59,4 +59,18 @@
#define FLAVOR_CPU_MONITOR_FATAL 2 #define FLAVOR_CPU_MONITOR_FATAL 2
#endif #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_ #endif // CRASHPAD_COMPAT_MAC_KERN_EXC_RESOURCE_H_

View File

@ -201,6 +201,12 @@ bool IsExceptionNonfatalResource(exception_type_t exception,
return true; return true;
} }
if (resource_type == RESOURCE_TYPE_IO) {
// These exceptions dont 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 // Treat unknown exceptions as fatal. This is the conservative approach: it
// may result in more crash reports being generated, but the type-flavor // may result in more crash reports being generated, but the type-flavor
// combinations can be evaluated to determine appropriate handling. // combinations can be evaluated to determine appropriate handling.