[Lldb-commits] [lldb] r159880 - /lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Sean Callanan scallanan at apple.com
Fri Jul 6 17:29:33 PDT 2012


Author: spyffe
Date: Fri Jul  6 19:29:33 2012
New Revision: 159880

URL: http://llvm.org/viewvc/llvm-project?rev=159880&view=rev
Log:
Fixed a crash in the class uniq'ing code where we
didn't check if the two classes had the same number
of members.

<rdar://problem/11678873>

Modified:
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=159880&r1=159879&r2=159880&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Fri Jul  6 19:29:33 2012
@@ -4995,6 +4995,18 @@
     
     if (src_size && dst_size)
     {
+        if (src_size != dst_size)
+        {
+            if (log)
+                log->Printf("warning: tried to unique class DIE 0x%8.8x to 0x%8.8x, but they didn't have the same size (src=%d, dst=%d)",
+                            src_class_die->GetOffset(),
+                            dst_class_die->GetOffset(),
+                            src_size,
+                            dst_size);
+            
+            return false;
+        }
+            
         uint32_t idx;
         for (idx = 0; idx < src_size; ++idx)
         {





More information about the lldb-commits mailing list