]> granicus.if.org Git - llvm/commit
[JITLink] Fixed a signedness bug when processing X86_64_RELOC_SUBTRACTOR.
authorLang Hames <lhames@gmail.com>
Thu, 9 May 2019 23:17:41 +0000 (23:17 +0000)
committerLang Hames <lhames@gmail.com>
Thu, 9 May 2019 23:17:41 +0000 (23:17 +0000)
commit76e6710242e15da426f00dd4503bdf385956780b
tree837fcbc7ff86d4ce7e77781170669d763f317180
parentf34129d190e554cfe78c3e0db58f170e090925e9
[JITLink] Fixed a signedness bug when processing X86_64_RELOC_SUBTRACTOR.

Subtractor relocation addends are signed, so we need to read them via signed
int pointers. Accidentally treating 32-bit addends as unsigned leads to
out-of-range errors when we try to add very large (>INT32_MAX) bogus addends.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360392 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ExecutionEngine/JITLink/MachO_x86_64.cpp
test/ExecutionEngine/JITLink/X86/MachO_x86-64_relocations.s