summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2016-01-09 19:50:40 +0000
committerLang Hames <lhames@gmail.com>2016-01-09 19:50:40 +0000
commit859d73ce950e6f13fc835e59ecc5d5bd5dcec0b3 (patch)
treef78d5ea2d678c32f989c0771ddc5cd99f998e02b /lldb/packages/Python/lldbsuite/test/python_api
parent543762da3e66f6310b479988e911236f10829ad1 (diff)
downloadbcm5719-llvm-859d73ce950e6f13fc835e59ecc5d5bd5dcec0b3.tar.gz
bcm5719-llvm-859d73ce950e6f13fc835e59ecc5d5bd5dcec0b3.zip
[Orc][RuntimeDyld] Prevent duplicate calls to finalizeMemory on shared memory
managers. Prior to this patch, recursive finalization (where finalization of one RuntimeDyld instance triggers finalization of another instance on which the first depends) could trigger memory access failures: When the inner (dependent) RuntimeDyld instance and its memory manager are finalized, memory allocated (but not yet relocated) by the outer instance is locked, and relocation in the outer instance fails with a memory access error. This patch adds a latch to the RuntimeDyld::MemoryManager base class that is checked by a new method: RuntimeDyld::finalizeWithMemoryManagerLocking, ensuring that shared memory managers are only finalized by the outermost RuntimeDyld instance. This allows ORC clients to supply the same memory manager to multiple calls to addModuleSet. In particular it enables the use of user-supplied memory managers with the CompileOnDemandLayer which must reuse the supplied memory manager for each function that is lazily compiled. llvm-svn: 257263
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud