[PATCH] D85738: [llvm-dwarfdump] Avoid crashing if an abbreviation offset is invalid.

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 08:37:35 PDT 2020


ikudrin created this revision.
ikudrin added reviewers: dblaikie, jhenderson, aprantl.
ikudrin added projects: LLVM, debug-info.
Herald added subscribers: cmtice, hiraditya.
ikudrin requested review of this revision.
Herald added a subscriber: MaskRay.

Note that `DWARFUnit::getAbbreviations()` returns `nullptr` if the abbreviations could not be read, but callers used the returned pointer without checking.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85738

Files:
  llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
  llvm/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp
  llvm/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp
  llvm/test/tools/llvm-dwarfdump/X86/debug_info_invalid_abbrev_offset.s
  llvm/test/tools/llvm-dwarfdump/X86/debug_types_invalid_abbrev_offset.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85738.284755.patch
Type: text/x-patch
Size: 5387 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200811/0fdb2e38/attachment.bin>


More information about the llvm-commits mailing list