[Lldb-commits] [lldb] b1575f9 - Missed a null-ptr check in previous PR for Debuginfod testing (#86292)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Mar 22 11:22:12 PDT 2024
Author: Kevin Frei
Date: 2024-03-22T11:22:09-07:00
New Revision: b1575f9082071702bd6aaa2600ce9fe011a091e9
URL: https://github.com/llvm/llvm-project/commit/b1575f9082071702bd6aaa2600ce9fe011a091e9
DIFF: https://github.com/llvm/llvm-project/commit/b1575f9082071702bd6aaa2600ce9fe011a091e9.diff
LOG: Missed a null-ptr check in previous PR for Debuginfod testing (#86292)
@GeorgeHuyubo noticed an unchecked shared pointer result in
https://github.com/llvm/llvm-project/pull/85693/. This is the fix for
that issue.
Co-authored-by: Kevin Frei <freik at meta.com>
Added:
Modified:
lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
index 91b8b4a979e0c7..a9956aa9075fe2 100644
--- a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
+++ b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
@@ -53,7 +53,7 @@ static bool IsDwpSymbolFile(const lldb::ModuleSP &module_sp,
ObjectFileSP dwp_obj_file = ObjectFile::FindPlugin(
module_sp, &file_spec, 0, FileSystem::Instance().GetByteSize(file_spec),
dwp_file_data_sp, dwp_file_data_offset);
- if (!ObjectFileELF::classof(dwp_obj_file.get()))
+ if (!dwp_obj_file || !ObjectFileELF::classof(dwp_obj_file.get()))
return false;
// The presence of a debug_cu_index section is the key identifying feature of
// a DWP file. Make sure we don't fill in the section list on dwp_obj_file
More information about the lldb-commits
mailing list