Aliaksei Zasenka
2014-Jan-17 12:23 UTC
[LLVMdev] Unable to catch Win64 exceptions that occur in the mcjit(ted) code
Hi all, In my MSVC-compiled project I am using MCJIT to run some generated code. I faced that in case of Win64 ('x86_64-pc-win32-elf') __try/__except block doesn't work - the stack can not be unwound. I have found that the only way to fix it is implementing my own *registerEHFrames* function of the Memory Manager (but I'm not sure this helps). Maybe someone had a success solving the same problem? What would be the best approach to catch exceptions from dynamically generated code on Win64? Thank you in advance Best regard Alexey -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140117/0e8e5259/attachment.html>
Yaron Keren
2014-Jan-17 13:03 UTC
[LLVMdev] Unable to catch Win64 exceptions that occur in the mcjit(ted) code
Hi Aliaksei, Exceptions on Win64 are not supported yet. Kai Nacke is working on the implementation. Yaron 2014/1/17 Aliaksei Zasenka <listhex at gmail.com>> > Hi all, > > In my MSVC-compiled project I am using MCJIT to run some generated code.I faced that in case of Win64 ('x86_64-pc-win32-elf') __try/__except block doesn't work - the stack can not be unwound.> I have found that the only way to fix it is implementing my ownregisterEHFrames function of the Memory Manager (but I'm not sure this helps).> > Maybe someone had a success solving the same problem? > What would be the best approach to catch exceptions from dynamicallygenerated code on Win64?> > Thank you in advance > > Best regard > Alexey > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140117/9f8914dc/attachment.html>
Aliaksei Zasenka
2014-Jan-17 14:28 UTC
[LLVMdev] Unable to catch Win64 exceptions that occur in the mcjit(ted) code
Hi Yaron, Kai and all, Thanks for your answer. What is the current status of the issue? You wrote>Kai Nacke implemented a patch for mingw32 / Win64 / SEH exceptions for theLDC compiler on top of LLVM Does it mean that Kai is working only on gcc-mingw Win64/SEH support? Is it planned to implement something like the *RtlAddFunctionTable*-based registrar for dynamically loaded code? May be I can help fixing it? Aliaksei 2014/1/17 Yaron Keren <yaron.keren at gmail.com>> Hi Aliaksei, > > Exceptions on Win64 are not supported yet. > Kai Nacke is working on the implementation. > > Yaron > > > > 2014/1/17 Aliaksei Zasenka <listhex at gmail.com> > > > > Hi all, > > > > In my MSVC-compiled project I am using MCJIT to run some generated code. > I faced that in case of Win64 ('x86_64-pc-win32-elf') __try/__except block > doesn't work - the stack can not be unwound. > > I have found that the only way to fix it is implementing my own > registerEHFrames function of the Memory Manager (but I'm not sure this > helps). > > > > Maybe someone had a success solving the same problem? > > What would be the best approach to catch exceptions from dynamically > generated code on Win64? > > > > Thank you in advance > > > > Best regard > > Alexey > > > > _______________________________________________ > > LLVM Developers mailing list > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140117/2ee63954/attachment.html>