[llvm] r342783 - [ORC] In RTDyldObjectLinkingLayer, only call NotifyFreed if the object file

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 25 09:24:45 PDT 2018


I do not think it is worth it in this case: This modification is for the
older ORC RTDyldObjectLinkingLayer class. I'm working to bring the new one
(Currently "RTDyldObjectLinkingLayer2") to feature parity, and as I do I'll
try to add unit tests. :)

-- Lang.

On Mon, Sep 24, 2018 at 7:52 PM David Blaikie <dblaikie at gmail.com> wrote:

> Any chance of a unit test?
>
> On Fri, Sep 21, 2018 at 4:01 PM Lang Hames via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> 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();
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180925/7fcb3dbf/attachment.html>


More information about the llvm-commits mailing list