summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2018-09-21 22:59:48 +0000
committerLang Hames <lhames@gmail.com>2018-09-21 22:59:48 +0000
commit47fc3a45507f16d4671bd68d711198f40da2596f (patch)
treeca899827ff320a2827e059c9e63dc9cb55bebf86
parent34893e6c0fb103f6470035cd46e637463d47a01e (diff)
downloadbcm5719-llvm-47fc3a45507f16d4671bd68d711198f40da2596f.tar.gz
bcm5719-llvm-47fc3a45507f16d4671bd68d711198f40da2596f.zip
[ORC] In RTDyldObjectLinkingLayer, only call NotifyFreed if the object file
has been finalized. This prevents crashes on unfinalized objects for clients using JITEventListeners. Patch by Geoff Levner. Thanks Geoff! llvm-svn: 342783
-rw-r--r--llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h b/llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
index 532c8337ec3..2376f36d38d 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
@@ -203,7 +203,7 @@ private:
}
~ConcreteLinkedObject() override {
- if (this->Parent.NotifyFreed)
+ if (this->Parent.NotifyFreed && ObjForNotify.getBinary())
this->Parent.NotifyFreed(K, *ObjForNotify.getBinary());
MemMgr->deregisterEHFrames();
OpenPOWER on IntegriCloud