[Lldb-commits] [lldb] r282653 - Introduced a null check to avoid a crash in a test on i386.

Sean Callanan via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 28 17:16:37 PDT 2016


Author: spyffe
Date: Wed Sep 28 19:16:37 2016
New Revision: 282653

URL: http://llvm.org/viewvc/llvm-project?rev=282653&view=rev
Log:
Introduced a null check to avoid a crash in a test on i386.

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

Modified: lldb/trunk/source/Target/StackFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StackFrame.cpp?rev=282653&r1=282652&r2=282653&view=diff
==============================================================================
--- lldb/trunk/source/Target/StackFrame.cpp (original)
+++ lldb/trunk/source/Target/StackFrame.cpp Wed Sep 28 19:16:37 2016
@@ -1419,6 +1419,10 @@ ValueObjectSP GetValueForDereferincingOf
 
   Error error;
   ValueObjectSP pointee = base->Dereference(error);
+    
+  if (!pointee) {
+    return ValueObjectSP();
+  }
 
   if (offset >= 0 && uint64_t(offset) >= pointee->GetByteSize()) {
     int64_t index = offset / pointee->GetByteSize();




More information about the lldb-commits mailing list