Skip to content

Conversation

@kevinfrei
Copy link
Contributor

@GeorgeHuyubo noticed an unchecked shared pointer result in #85693. This is the fix for that issue.

@kevinfrei kevinfrei marked this pull request as ready for review March 22, 2024 15:07
@kevinfrei kevinfrei requested a review from JDevlieghere as a code owner March 22, 2024 15:07
@llvmbot llvmbot added the lldb label Mar 22, 2024
@llvmbot
Copy link
Member

llvmbot commented Mar 22, 2024

@llvm/pr-subscribers-lldb

Author: Kevin Frei (kevinfrei)

Changes

@GeorgeHuyubo noticed an unchecked shared pointer result in #85693. This is the fix for that issue.


Full diff: https://github.com/llvm/llvm-project/pull/86292.diff

1 Files Affected:

  • (modified) lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp (+1-1)
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

Copy link
Contributor

@GeorgeHuyubo GeorgeHuyubo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@clayborg clayborg merged commit b1575f9 into llvm:main Mar 22, 2024
omjavaid added a commit that referenced this pull request Mar 22, 2024
chencha3 pushed a commit to chencha3/llvm-project that referenced this pull request Mar 23, 2024
…6292)

@GeorgeHuyubo noticed an unchecked shared pointer result in
llvm#85693. This is the fix for
that issue.

Co-authored-by: Kevin Frei <[email protected]>
@kevinfrei kevinfrei deleted the debuginfod-nullptrfix branch July 2, 2024 21:00
XavierRaynaud pushed a commit to kalray/llvm-project that referenced this pull request Oct 28, 2025
…6292)

@GeorgeHuyubo noticed an unchecked shared pointer result in
llvm#85693. This is the fix for
that issue.

Co-authored-by: Kevin Frei <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants