[Lldb-commits] [lldb] r364344 - Add a defensive check for nullptr as in the block above.

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 25 12:50:12 PDT 2019


Author: adrian
Date: Tue Jun 25 12:50:12 2019
New Revision: 364344

URL: http://llvm.org/viewvc/llvm-project?rev=364344&view=rev
Log:
Add a defensive check for nullptr as in the block above.

Unfortunately I had to work backwards from a crash log,
so I don't have a good testcase at this point in time.

rdar://problem/51874647

Modified:
    lldb/trunk/source/Target/CPPLanguageRuntime.cpp

Modified: lldb/trunk/source/Target/CPPLanguageRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/CPPLanguageRuntime.cpp?rev=364344&r1=364343&r2=364344&view=diff
==============================================================================
--- lldb/trunk/source/Target/CPPLanguageRuntime.cpp (original)
+++ lldb/trunk/source/Target/CPPLanguageRuntime.cpp Tue Jun 25 12:50:12 2019
@@ -280,7 +280,7 @@ CPPLanguageRuntime::FindLibCppStdFunctio
   }
 
   // Case 4 or 5
-  if (!symbol->GetName().GetStringRef().startswith("vtable for")) {
+  if (symbol && !symbol->GetName().GetStringRef().startswith("vtable for")) {
     optional_info.callable_case =
         LibCppStdFunctionCallableCase::FreeOrMemberFunction;
     optional_info.callable_address = function_address_resolved;




More information about the lldb-commits mailing list