]> granicus.if.org Git - llvm/commit
[RISCV] Fix a potential issue in shouldInsertFixupForCodeAlign()
authorAlex Bradbury <asb@lowrisc.org>
Tue, 16 Jul 2019 04:37:19 +0000 (04:37 +0000)
committerAlex Bradbury <asb@lowrisc.org>
Tue, 16 Jul 2019 04:37:19 +0000 (04:37 +0000)
commita72781d6bd0df2677662cb9c6d466907dbb5dd53
tree83e40038721591592cf2c6fd4bc014766f8ec33f
parent6d9af5b8554d1fbc74931d74d3f8d09e981c9dcb
[RISCV] Fix a potential issue in shouldInsertFixupForCodeAlign()

The bool result of shouldInsertExtraNopBytesForCodeAlign() is not checked but
the returned nop count is unconditionally read even though it could be
uninitialized.

Differential Revision: https://reviews.llvm.org/D63285
Patch by Edward Jones.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366175 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp