[PATCH] D83043: [DebugInfo] Use Cursor to detect errors in debug line prologue parser

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 2 06:25:38 PDT 2020


jhenderson created this revision.
jhenderson added reviewers: ikudrin, aprantl, dblaikie, labath, probinson, MaskRay, JDevlieghere.
Herald added subscribers: cmtice, hiraditya.
Herald added a project: LLVM.

Previously, the debug line parser would keep attempting to read data even if it had run out of data to read. This meant errors in parsing would often end up being reported as something else, such as an unknown version or malformed directory/filename table. This patch fixes the issues by using the Cursor API to capture errors.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83043

Files:
  llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
  llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test
  llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83043.275086.patch
Type: text/x-patch
Size: 11749 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200702/b91f5dbb/attachment-0001.bin>


More information about the llvm-commits mailing list