[DebugInfo] Add use of truncating data extractor to debug line parsing
authorJames Henderson <james.henderson@sony.com>
Wed, 20 May 2020 14:53:44 +0000 (15:53 +0100)
committerJames Henderson <james.henderson@sony.com>
Mon, 1 Jun 2020 11:33:21 +0000 (12:33 +0100)
commite8bcf4ef07ccba4a707b197f1bdee05a19936c47
tree5ad19a37112b2c023a6b12fa6b356654e879c296
parent2b37c5b560584f05edf5d375d4ca86fe9c5b0173
[DebugInfo] Add use of truncating data extractor to debug line parsing

This will ensure that nothing can ever start parsing data from a future
sequence and part-read data will be returned as 0 instead.

Reviewed by: aprantl, labath

Differential Revision: https://reviews.llvm.org/D80796
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