[llvm] r342783 - [ORC] In RTDyldObjectLinkingLayer, only call NotifyFreed if the object file
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 21 15:59:48 PDT 2018
Author: lhames
Date: Fri Sep 21 15:59:48 2018
New Revision: 342783
URL: http://llvm.org/viewvc/llvm-project?rev=342783&view=rev
Log:
[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!
Modified:
llvm/trunk/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h?rev=342783&r1=342782&r2=342783&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h Fri Sep 21 15:59:48 2018
@@ -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();
More information about the llvm-commits
mailing list