[Lldb-commits] [lldb] r160135 - /lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
Sean Callanan
scallanan at apple.com
Thu Jul 12 11:04:03 PDT 2012
Author: spyffe
Date: Thu Jul 12 13:04:03 2012
New Revision: 160135
URL: http://llvm.org/viewvc/llvm-project?rev=160135&view=rev
Log:
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>
Modified:
lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=160135&r1=160134&r2=160135&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Thu Jul 12 13:04:03 2012
@@ -3236,8 +3236,21 @@
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;
}
More information about the lldb-commits
mailing list