diff --git a/compat/mac/kern/exc_resource.h b/compat/mac/kern/exc_resource.h index 30e9b855..ca8943d3 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 0199b314..cef90f9a 100644 --- a/util/mach/exception_types.cc +++ b/util/mach/exception_types.cc @@ -201,6 +201,12 @@ bool IsExceptionNonfatalResource(exception_type_t exception, 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.