[Lldb-commits] [lldb] r164870 - /lldb/trunk/source/Core/CXXFormatterFunctions.cpp

Enrico Granata egranata at apple.com
Fri Sep 28 17:45:53 PDT 2012


Author: enrico
Date: Fri Sep 28 19:45:53 2012
New Revision: 164870

URL: http://llvm.org/viewvc/llvm-project?rev=164870&view=rev
Log:
<rdar://problem/12378910> Fixing a potential crasher in the data formatters where we fail to check for NULL or empty class name

Modified:
    lldb/trunk/source/Core/CXXFormatterFunctions.cpp

Modified: lldb/trunk/source/Core/CXXFormatterFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/CXXFormatterFunctions.cpp?rev=164870&r1=164869&r2=164870&view=diff
==============================================================================
--- lldb/trunk/source/Core/CXXFormatterFunctions.cpp (original)
+++ lldb/trunk/source/Core/CXXFormatterFunctions.cpp Fri Sep 28 19:45:53 2012
@@ -487,6 +487,9 @@
     
     const char* class_name = descriptor->GetClassName().GetCString();
     
+    if (!class_name || !*class_name)
+        return false;
+    
     uint64_t info_bits_location = valobj_addr + ptr_size;
     if (process_sp->GetByteOrder() != lldb::eByteOrderLittle)
         info_bits_location += 3;





More information about the lldb-commits mailing list