[PATCH] D74309: [DebugInfo] Add check for zero debug line opcode_base
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 10 03:59:45 PST 2020
jhenderson created this revision.
jhenderson added reviewers: dblaikie, ikudrin, MaskRay, JDevlieghere, probinson.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
The number of standard opcodes is defined to be opcode_base - 1, so a value of 0 for the opcode_base caused a crash as an attempt was made to reserve many entries in a vector. This change fixes the crash, by issuing a warning and skipping reading of standard opcode lengths in the event of an opcode_base of 0.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74309
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
llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74309.243505.patch
Type: text/x-patch
Size: 7012 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200210/98d1a1d5/attachment.bin>
More information about the llvm-commits
mailing list