[PATCH] D83049: [DebugInfo] Do not hang when parsing a malformed .debug_pub* section.

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 2 07:31:19 PDT 2020


ikudrin created this revision.
ikudrin added reviewers: jhenderson, dblaikie, aprantl, MaskRay, ruiu.
ikudrin added projects: LLVM, lld, debug-info.
Herald added subscribers: arphaman, hiraditya, arichardson, emaste.
Herald added a reviewer: espindola.
ikudrin added a child revision: D83050: [DebugInfo] Add more checks to parsing .debug_pub* sections..
ikudrin added a reviewer: labath.

The parsing method did not check reading errors and might easily fall into an infinite loop on an invalid input because of that.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83049

Files:
  lld/ELF/DWARF.h
  lld/ELF/SyntheticSections.cpp
  lld/test/ELF/gdb-index-invalid-pubnames.s
  llvm/include/llvm/DebugInfo/DWARF/DWARFDebugPubTable.h
  llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp
  llvm/test/DebugInfo/X86/dwarfdump-debug-pubnames-invalid.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83049.275105.patch
Type: text/x-patch
Size: 9649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200702/99d71e0a/attachment.bin>


More information about the llvm-commits mailing list