llvm-6502/lib/ExecutionEngine/MCJIT
David Blaikie 00121bb932 PR19553: Memory leak in RuntimeDyldELF::createObjectImageFromFile
This starts in MCJIT::getSymbolAddress where the
unique_ptr<object::Binary> is release()d and (after a cast) passed to a
single caller, MCJIT::addObjectFile.

addObjectFile calls RuntimeDyld::loadObject.
RuntimeDld::loadObject calls RuntimeDyldELF::createObjectFromFile

And the pointer is never owned at this point. I say this point, because
the alternative codepath, RuntimeDyldMachO::createObjectFile certainly
does take ownership, so this seemed like a good hint that this was a/the
right place to take ownership.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207580 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 21:52:46 +00:00
..
CMakeLists.txt Moving SectionMemoryManager to MCJIT to avoid cross dependency between JIT and RuntimeDyld 2012-11-28 01:02:06 +00:00
LLVMBuild.txt LLVMBuild.txt: Add missing dependencies. 2014-04-10 11:16:47 +00:00
Makefile
MCJIT.cpp PR19553: Memory leak in RuntimeDyldELF::createObjectImageFromFile 2014-04-29 21:52:46 +00:00
MCJIT.h PR19553: Memory leak in RuntimeDyldELF::createObjectImageFromFile 2014-04-29 21:52:46 +00:00
SectionMemoryManager.cpp [C++] Use 'nullptr'. 2014-04-24 06:44:33 +00:00