[RuntimeDyld] Add bounds checking to SectionEntry::advanceStubOffset
authorSanjoy Das <sanjoy@playingwithpointers.com>
Mon, 23 Nov 2015 21:47:46 +0000 (21:47 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Mon, 23 Nov 2015 21:47:46 +0000 (21:47 +0000)
commit0fec8398ca177cf1767deab887bc6c3557c73170
treedcfa5d3491e7deb9b8e0d2917b7e8516ee4669b9
parent43e224dd49b2ffb1d9ace8a2a30407c1b3eb43fe
[RuntimeDyld] Add bounds checking to SectionEntry::advanceStubOffset

Summary:
Change SectionEntry to keep track of the size of its underlying
allocation, and use that to bounds check advanceStubOffset.

Reviewers: lhames, andrew.w.kaylor, reames

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D14675

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253919 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h