[LLVMdev] problem with DwarfEHPrepare::InsertUnwindResumeCalls in multiple JIT context?
Duncan Sands
baldrick at free.fr
Thu Nov 10 20:06:55 PST 2011
Hi Damien, the pass wasn't expecting the module to be changing underneath it.
It should be easy enough to tweak it to add the declaration whenever it is
needed. Please send a patch or open a bug report.
Ciao, Duncan.
> Hi, I was wondering if there are any known issues with DwarfEHPrepare ::
> InsertUnwindResumeCalls when using JIT? It appears that the block of code below
> in this function doesn't correctly handle the case where the rewind function is
> removed from the module by some other pass (when its unused for instance), and
> multiple functions are JITed. The RewindFunction variable will get set once,
> then when the rewind function is removed it never gets updated. Is this just an
> unsupported use case of calling the JIT multiple times, or am I missing
> something? Thanks!
>
>
> Damien
>
> if (! RewindFunction ) {
>
> LLVMContext & Ctx = Resumes [0]-> getContext ();
>
> FunctionType * FTy = FunctionType :: get ( Type :: getVoidTy ( Ctx ),
>
> Type :: getInt8PtrTy ( Ctx ), false );
>
> const char * RewindName = TLI -> getLibcallName ( RTLIB :: UNWIND_RESUME );
>
> RewindFunction = F -> getParent ()-> getOrInsertFunction ( RewindName , FTy );
>
> }
>
>
>
> This e-mail and its attachments are intended only for the individual or entity
> to whom it is addressed and may contain information that is confidential,
> privileged, inside information, or subject to other restrictions on use or
> disclosure. Any unauthorized use, dissemination or copying of this transmission
> or the information in it is prohibited and may be unlawful. If you have received
> this transmission in error, please notify the sender immediately by return
> e-mail, and permanently delete or destroy this e-mail, any attachments, and all
> copies (digital or paper). Unless expressly stated in this e-mail, nothing in
> this message should be construed as a digital or electronic signature.
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list