OSDN Git Service

[Sparc] Avoid writing outside array in applyFixup
authorDaniel Cederman <cederman@gaisler.com>
Mon, 27 Aug 2018 11:43:59 +0000 (11:43 +0000)
committerDaniel Cederman <cederman@gaisler.com>
Mon, 27 Aug 2018 11:43:59 +0000 (11:43 +0000)
commita6e572daa8b8b8a4981d83acd352daccb9c8dfe5
treeba8a0d288d33f5ea8bffc6e12897fadac11e6fe3
parent4fc5f360c932ef90d80f3caa720f875948bf44a2
[Sparc] Avoid writing outside array in applyFixup

Summary: If an object file ends with a relocation that is smaller
than 4 bytes we will write outside the Data array and trigger an
"Invalid index" assertion.

Reviewers: jyknight, venkatra

Reviewed By: jyknight

Subscribers: fedor.sergeev, jrtc27, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340736 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp
test/MC/Sparc/sparc-relocations.s