diff options
| author | Sean Callanan <scallanan@apple.com> | 2012-07-12 18:04:03 +0000 |
|---|---|---|
| committer | Sean Callanan <scallanan@apple.com> | 2012-07-12 18:04:03 +0000 |
| commit | 41f88aad983dbee9ba817d022781ac33f9223007 (patch) | |
| tree | 17a2e12805e332901a5617393ddf3e372e3298f4 | |
| parent | 54c39e068861e4733ec7a14e5068dd6adf6e36df (diff) | |
| download | bcm5719-llvm-41f88aad983dbee9ba817d022781ac33f9223007.tar.gz bcm5719-llvm-41f88aad983dbee9ba817d022781ac33f9223007.zip | |
Blacklisted a UUID that is generated by OpenCL on
Mac OS X, because the UUID is the same for all
OpenCL-generated dylibs and therefore would
conflict.
<rdar://problem/11620586>
llvm-svn: 160135
| -rw-r--r-- | lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index afe897e86c3..4818ad13a77 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -3236,8 +3236,21 @@ ObjectFileMachO::GetUUID (lldb_private::UUID* uuid) if (load_cmd.cmd == LoadCommandUUID) { const uint8_t *uuid_bytes = m_data.PeekData(offset, 16); + if (uuid_bytes) { + // OpenCL on Mac OS X uses the same UUID for each of its object files. + // We pretend these object files have no UUID to prevent crashing. + + const uint8_t opencl_uuid[] = { 0x8c, 0x8e, 0xb3, 0x9b, + 0x3b, 0xa8, + 0x4b, 0x16, + 0xb6, 0xa4, + 0x27, 0x63, 0xbb, 0x14, 0xf0, 0x0d }; + + if (!memcmp(uuid_bytes, opencl_uuid, 16)) + return false; + uuid->SetBytes (uuid_bytes); return true; } |

