mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-20 10:43:46 +00:00
mac: Update cl_kernels workaround for macOS 10.13 (and later)
Since Apple closed https://openradar.appspot.com/20239912 without fixing anything, it looks like we’ll be stuck with these quriky cl_kernels modules for quite some time. Allow these modules to be tolerated on any OS version >= 10.10, where they first appeared in a broken state, by removing the upper bound for the OS version to tolerate with this quirk. The tolerance was previously expanded to include 10.11 in cd1f8fa3d2f2c76802952beac71ad85f51bbf771 and 10.12 in 6fe7c5414e46acfa30e8984513bf0896e91b9407. After this third update, this should hopefully no longer be an annual exercise. Bug: crashpad:185, crashpad:186 Change-Id: I66d409f2d1638bcf7601b6622f000be245230f34 Reviewed-on: https://chromium-review.googlesource.com/534253 Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
f845797732
commit
2851e5cfc8
@ -120,7 +120,6 @@ bool MachOImageSegmentReader::Initialize(ProcessReader* process_reader,
|
|||||||
sections_.size(),
|
sections_.size(),
|
||||||
load_command_info.c_str());
|
load_command_info.c_str());
|
||||||
|
|
||||||
if (section_segment_name != segment_name) {
|
|
||||||
// cl_kernels modules (for OpenCL) aren’t ld output, and they’re formatted
|
// cl_kernels modules (for OpenCL) aren’t ld output, and they’re formatted
|
||||||
// incorrectly on OS X 10.10 and later. 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.
|
// but one of the sections within it claims to belong to the __LD segment.
|
||||||
@ -133,24 +132,18 @@ bool MachOImageSegmentReader::Initialize(ProcessReader* process_reader,
|
|||||||
// sometimes more will be, tolerate this quirk.
|
// sometimes more will be, tolerate this quirk.
|
||||||
//
|
//
|
||||||
// https://openradar.appspot.com/20239912
|
// https://openradar.appspot.com/20239912
|
||||||
bool ok = false;
|
if (section_segment_name != segment_name &&
|
||||||
if (file_type == MH_BUNDLE && module_name == "cl_kernels") {
|
!(file_type == MH_BUNDLE &&
|
||||||
int mac_os_x_minor_version = MacOSXMinorVersion();
|
module_name == "cl_kernels" &&
|
||||||
if ((mac_os_x_minor_version >= 10 && mac_os_x_minor_version <= 12) &&
|
MacOSXMinorVersion() >= 10 &&
|
||||||
segment_name == SEG_TEXT &&
|
segment_name == SEG_TEXT &&
|
||||||
section_segment_name == "__LD" &&
|
section_segment_name == "__LD" &&
|
||||||
section_name == "__compact_unwind" &&
|
section_name == "__compact_unwind" &&
|
||||||
(section.flags & S_ATTR_DEBUG)) {
|
(section.flags & S_ATTR_DEBUG))) {
|
||||||
ok = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ok) {
|
|
||||||
LOG(WARNING) << "section.segname incorrect in segment " << segment_name
|
LOG(WARNING) << "section.segname incorrect in segment " << segment_name
|
||||||
<< section_info;
|
<< section_info;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
CheckedMachAddressRange section_range(
|
CheckedMachAddressRange section_range(
|
||||||
process_reader->Is64Bit(), section.addr, section.size);
|
process_reader->Is64Bit(), section.addr, section.size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user