mac: Update cl_kernels workaround for 10.12

BUG=crashpad:120

Change-Id: If863a181cb0671a90752070a818efaa7eea89ff9
Reviewed-on: https://chromium-review.googlesource.com/353630
Reviewed-by: Robert Sesek <rsesek@chromium.org>
This commit is contained in:
Mark Mentovai 2016-06-17 13:16:07 -04:00
parent 35da3b6735
commit 6fe7c5414e

View File

@ -122,7 +122,7 @@ bool MachOImageSegmentReader::Initialize(ProcessReader* process_reader,
if (section_segment_name != segment_name) {
// cl_kernels modules (for OpenCL) arent ld output, and theyre formatted
// incorrectly on OS X 10.10 and 10.11. They have a single __TEXT segment,
// incorrectly on OS X 10.10 and later. They have a single __TEXT segment,
// but one of the sections within it claims to belong to the __LD segment.
// This mismatch shouldnt happen. This errant section also has the
// S_ATTR_DEBUG flag set, which shouldnt happen unless all of the other
@ -136,7 +136,7 @@ bool MachOImageSegmentReader::Initialize(ProcessReader* process_reader,
bool ok = false;
if (file_type == MH_BUNDLE && module_name == "cl_kernels") {
int mac_os_x_minor_version = MacOSXMinorVersion();
if ((mac_os_x_minor_version == 10 || mac_os_x_minor_version == 11) &&
if ((mac_os_x_minor_version >= 10 && mac_os_x_minor_version <= 12) &&
segment_name == SEG_TEXT &&
section_segment_name == "__LD" &&
section_name == "__compact_unwind" &&