[LLVMdev] [PATCH] Why isn't __deregister_frame called anywhere in LLVM?

Yuri
Fri, 24 Sep 2010 09:34:27 -0000

Please check in an attached patch.

Synopsys of the change: fixed the cleanup process of exception
information in JIT. Now JIT deregisters registered by it FDE structures
allowing consecutive JIT runs to succeed.

Note: tools like lli should delete ExecutionEngine object and not the
module. Module is deleted by ExecutionEngine. Also I am not sure if this
is proper for the module to be owned by ExecutionEngine. I think they
should be independently owned.

Yuri


23.09.2010 01:11, Yuri wrote:
> I have two JIT runs in the same process.
> First one runs fine. During the second JIT run the exception is
> thrown, and process catches SEGV after it is thrown and before it is
> caught.
>
> In debugger I see that crash occurs in the function
> 'classify_object_over_fdes' called from 'init_object'
called from
> 'search_object' called from '_Unwind_Find_registered_FDE'.
Crash
> occurs on invalid FDE object after several iterations over the valid
> FDE objects. So it looks like an invalid FDE object is attached to the
> valid ones. Also when I split two JIT runs into the separate processes
> nothing crashes.
>
> As I understand, __deregister_frame has to be called during code
> removal. I can only see __register_frame call, and not
> __deregister_frame. Why?
>
> Yuri

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.txt
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20100924/aaa8ff8e/attachment.txt>