HomePhabricator

[DebugInfo] Add check for zero debug line opcode_base

Authored by jhenderson on Tue, Feb 11, 4:17 AM.

Description

[DebugInfo] Add check for zero debug line opcode_base

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.

Reviewed by: dblaikie

Differential Revision: https://reviews.llvm.org/D74309

Details

Committed
jhendersonWed, Feb 12, 6:49 AM
Reviewer
dblaikie
Differential Revision
D74309: [DebugInfo] Add check for zero debug line opcode_base
Parents
rG1da62b51a5f0: [DebugInfo] Print version in error message in decimal
Branches
Unknown
Tags
Unknown