[Lldb-commits] [lldb] a079f61 - [LLDB] Add a defensive check for member__f_

via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 24 14:48:29 PDT 2020


Author: shafik
Date: 2020-09-24T14:48:21-07:00
New Revision: a079f619b5a1959af8af37cabdea27ae542903db

URL: https://github.com/llvm/llvm-project/commit/a079f619b5a1959af8af37cabdea27ae542903db
DIFF: https://github.com/llvm/llvm-project/commit/a079f619b5a1959af8af37cabdea27ae542903db.diff

LOG: [LLDB] Add a defensive check for member__f_

I only have a crash log and was not able to come up with a test case for this.

rdar://problem/69403150

Added: 
    

Modified: 
    lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
index 8aa803a8553e..d3a25f37985f 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
@@ -154,6 +154,9 @@ CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(
         member__f_ = sub_member__f_;
   }
 
+  if (!member__f_)
+    return optional_info;
+
   lldb::addr_t member__f_pointer_value = member__f_->GetValueAsUnsigned(0);
 
   optional_info.member__f_pointer_value = member__f_pointer_value;


        


More information about the lldb-commits mailing list