HomePhabricator

[SystemZ] Fix disassembler crashes

Authored by uweigand on Oct 20 2020, 1:19 AM.

Description

[SystemZ] Fix disassembler crashes

The "Size" value returned by SystemZDisassembler::getInstruction is
used by common code even in the case where the routine returns
failure. If that Size value exceeds the number of bytes remaining
in the section, that could cause disassembler crashes.

Fixed by never returning more than the number of bytes remaining.

Details

Committed
uweigandOct 20 2020, 1:21 AM
Parents
rG991e86156c88: [ARM][SchedModels] Convert IsCPSRDefinedPred to MCSchedPredicate
Branches
Unknown
Tags
Unknown