[Lldb-commits] [lldb] Missed a null-ptr check in previous PR for Debuginfod testing (PR #86292)
Kevin Frei via lldb-commits
lldb-commits at lists.llvm.org
Fri Mar 22 08:06:57 PDT 2024
https://github.com/kevinfrei created https://github.com/llvm/llvm-project/pull/86292
@GeorgeHuyubo noticed an unchecked shared pointer result in https://github.com/llvm/llvm-project/pull/85693/. This is the fix for that issue.
>From 6bc82c0820963050752e6faabef7ec10e8c81f2f Mon Sep 17 00:00:00 2001
From: Kevin Frei <freik at meta.com>
Date: Fri, 22 Mar 2024 08:04:37 -0700
Subject: [PATCH] Missed a null-ptr check in previous PR
---
lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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