[all-commits] [llvm/llvm-project] c299f3: [SystemZ] Fix disassembler crashes

Ulrich Weigand via All-commits all-commits at lists.llvm.org
Tue Oct 20 01:22:15 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c299f3555d77aef598506b254dcf728928e616de
      https://github.com/llvm/llvm-project/commit/c299f3555d77aef598506b254dcf728928e616de
  Author: Ulrich Weigand <ulrich.weigand at de.ibm.com>
  Date:   2020-10-20 (Tue, 20 Oct 2020)

  Changed paths:
    M llvm/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp

  Log Message:
  -----------
  [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.




More information about the All-commits mailing list