[PATCH]Unload EH frames in ~MCJIT

Yaron Keren yaron.keren at gmail.com
Wed Oct 9 13:23:35 PDT 2013


Hi Andy,

Yes, multi-module support is a big change. I'll wait for your patch to be
completed.

I did write initially a deregisterEHframes() version but it was duplicating
the code of registerEHframes function with a different function to call,
duplicated the forward function to the MemMgr etc.etc.
The code duplication was avoided by the flag, inspired by
the runStaticConstructorsDestructors() function.

Yaron




2013/10/9 Kaylor, Andrew <andrew.kaylor at intel.com>

>  Hi Yaron,****
>
> ** **
>
> I’m in the process of updating the EH frame support in MCJIT and
> RuntimeDyld to handle registration of multiple generated or loaded
> objects.  These changes involve an update to the memory manager and
> RuntimeDyld interfaces for registering EH frame data.  They will also
> highlight complications which would need to be considered in your patch
> with regard to deregistration of frame data.****
>
> ** **
>
> In addition, I would prefer to have a separate “deregister” function
> rather than overloading the behavior of the registerFrames function.****
>
> ** **
>
> I’m attaching my current patch so you can see where this is going.  Also
> feel free to provide feedback on the patch.****
>
> ** **
>
> Please wait for my multiple object patch to be committed.  After that we
> can discuss the details of how deregistration should work.****
>
> ** **
>
> Thanks,****
>
> Andy****
>
> ** **
>
> ** **
>
> *From:* llvm-commits-bounces at cs.uiuc.edu [mailto:
> llvm-commits-bounces at cs.uiuc.edu] *On Behalf Of *Yaron Keren
> *Sent:* Wednesday, October 09, 2013 10:22 AM
> *To:* llvm-commits at cs.uiuc.edu
> *Subject:* [PATCH]Unload EH frames in ~MCJIT****
>
> ** **
>
> Module loaded with MCJIT register its EH frames with __register_frame to
> the runtime library. After MCJIT destructs and the module unloaded,  the
> runtime stays with invalid frames of the module, leading to faulty EH
> behaviour next time.****
>
> ** **
>
> This patch calls __deregister_frame upon MCJIT destruction to keep proper
> runtime library EH state.****
>
> ** **
>
> Yaron****
>
> ** **
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131009/2b1f4422/attachment.html>


More information about the llvm-commits mailing list