shafik created this revision.
shafik added reviewers: friss, jingham, aam.
We track down a crash in FindLibCppStdFunctionCallableInfo() to a missing
`nullptr` check for the `symbol` variable.
https://reviews.llvm.org/D61805
Files:
source/Target/CPPLanguageRuntime.cpp
Index: source/Target/CPPLanguageRuntime.cpp
===================================================================
--- source/Target/CPPLanguageRuntime.cpp
+++ source/Target/CPPLanguageRuntime.cpp
@@ -278,7 +278,8 @@
}
// Case 4 or 5
- if (!symbol->GetName().GetStringRef().startswith("vtable for")) {
+ if (symbol != nullptr &&
+ !symbol->GetName().GetStringRef().startswith("vtable for")) {
optional_info.callable_case =
LibCppStdFunctionCallableCase::FreeOrMemberFunction;
optional_info.callable_address = function_address_resolved;
Index: source/Target/CPPLanguageRuntime.cpp
===================================================================
--- source/Target/CPPLanguageRuntime.cpp
+++ source/Target/CPPLanguageRuntime.cpp
@@ -278,7 +278,8 @@
}
// Case 4 or 5
- if (!symbol->GetName().GetStringRef().startswith("vtable for")) {
+ if (symbol != nullptr &&
+ !symbol->GetName().GetStringRef().startswith("vtable for")) {
optional_info.callable_case =
LibCppStdFunctionCallableCase::FreeOrMemberFunction;
optional_info.callable_address = function_address_resolved;
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits