[LLVMdev] MCJIT + Win64 SEH handling problem (missing unwinding info)

Aliaksei Zasenka listhex at gmail.com
Tue Oct 28 05:25:33 PDT 2014


Hi all,

I'm using MCJIT for running the manually generated code under both Win32
and Win64 environments.  Unfortunately catching exceptions under Win64
doesn't work. As I understand the main problem is the lack of function
table that is needed to unwind a call stack.

Microsoft says
<http://msdn.microsoft.com/en-us/library/windows/desktop/ms680595%28v=vs.85%29.aspx>
*Function tables are used on 64-bit Windows to determine how to unwind or
walk the stack. These tables are usually generated by the compiler and
stored as part of the image. However, applications must provide the
function table for dynamically generated code.*

As I can see LLVM usually creates Function Table when generating COFF
(Win64EH::UnwindEmitter). But MCJIT can load only ELF files.

Is there any way to workaround the problem? Maybe it is already planned to
implement COFF loading in MCJIT?

Best regards,
Aliaksei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141028/3d3cc3ed/attachment.html>


More information about the llvm-dev mailing list