[PATCH] D74413: [DebugInfo] Add checks for v2 directory and file name table terminators

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 07:50:45 PST 2020


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

The DWARFv2-4 specification for the line table header states that the include directories and file name tables both end with a single null byte. Prior to this change, the parser did not detect if this byte was missing, because it also stopped reading the tables once it reached the prologue end, as claimed by the header_length field. This change adds a check that the terminator has been seen at the end of each table.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74413

Files:
  llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
  llvm/test/tools/llvm-dwarfdump/X86/Inputs/debug_line_malformed.s
  llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74413.243878.patch
Type: text/x-patch
Size: 10649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200211/1f0b9835/attachment.bin>


More information about the llvm-commits mailing list