[LLDB] Add a defensive check for member__f_
authorshafik <syaghmour@apple.com>
Thu, 24 Sep 2020 21:31:31 +0000 (14:31 -0700)
committershafik <syaghmour@apple.com>
Thu, 24 Sep 2020 21:48:21 +0000 (14:48 -0700)
I only have a crash log and was not able to come up with a test case for this.

rdar://problem/69403150

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

index 8aa803a..d3a25f3 100644 (file)
@@ -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;