[fpc-pascal] Re: LuaJIT 2 crashes under FPC+Win64. SEH issue?
Reinier Olislagers
reinierolislagers at gmail.com
Sat Mar 2 11:46:48 CET 2013
On 2-3-2013 11:42, denisgolovan wrote:
> Hi all
>
> Currently I am trying to make work attached code under Win64.
> It uses LuaJIT 2 as drop-in replacement to Lua.
>
> The code works fine under Linux32, Linux64, Win32, but not under Win64.
> Under Win64 it crashes with unhandled exception like following:
>
> An unhandled exception occurred at $0000000077D67D9D:
> EControlC: Control-C hit
> $0000000077D67D9D
>
> The same dll works fine under gcc/msvc complied project (luajit.exe interpreter which comes in box).
>
> The idea of the attached code is following:
> - try to calculate _invalid_ Lua code
> - return Lua error (not exception).
>
> The problem seems to have something to do with exception handling under Win64 as LuaJIT 2 using native exceptions in its dll.
> But it does not mean that C exceptions should be catched by FPC. I understand that's not possible.
> lua_pcall should handle those internally (like under Linux64).
>
> It looks like some issue in FPC prevents LuaJIT catch its own exception under Win64.
Yep, it seems like issue is exception handling (similar to issue
http://bugs.freepascal.org/view.php?id=21581
etc)
Try compiling FPC with -dTEST_WIN64_SEH and try again...
To the devs: any news about Win64 SEH code progress?
More information about the fpc-pascal
mailing list