[PATCH] D82017: [DebugInfo/DWARF] - Do not hang when CFI are truncated.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 17 08:03:50 PDT 2020


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay, aprantl, probinson.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
grimar retitled this revision from "[DebugInfo/DWARF] - Do not hang when the CFI is truncated." to "[DebugInfo/DWARF] - Do not hang when CFI are truncated.".

Currently when the .eh_frame section is truncated so that
CFI instructions can't be read, it is possible to enter
an infinite loop.

It happens because `CFIProgram::parse` does not handle errors properly.
This patch fixes the issue.


https://reviews.llvm.org/D82017

Files:
  llvm/include/llvm/DebugInfo/DWARF/DWARFDataExtractor.h
  llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
  llvm/test/DebugInfo/X86/eh-frame-truncated-cfi.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82017.271374.patch
Type: text/x-patch
Size: 6474 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200617/a53ac803/attachment.bin>


More information about the llvm-commits mailing list