[PATCH] D71702: [DebugInfo] Relax some checking in the debug line parser
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 19 06:25:24 PST 2019
jhenderson created this revision.
jhenderson added reviewers: JDevlieghere, ikudrin, MaskRay, dblaikie, probinson.
Herald added subscribers: hiraditya, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
The debug line parser was being overly conservative in its checking in some areas. This change removes some checks, and modifies the parser to attempt to recover from more situations where something looks wrong. In cases where a length doesn't match what has been read, parsing is now resumed from the later position (i.e. std::max(OldOffset + Length, CurrentOffset)).
This patch also improves some related testing to make it easier to see what the test is doing.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71702
Files:
lld/test/ELF/undef.s
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
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
llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71702.234709.patch
Type: text/x-patch
Size: 51530 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191219/49b57a49/attachment-0001.bin>
More information about the llvm-commits
mailing list