[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.2 compiled with MINGW32 crashes my host program when a Lua error occurs
- From: Lorenzo Donati <lorenzodonatibz@...>
- Date: Mon, 11 Nov 2013 22:20:01 +0100
On 11/11/2013 20.10, Roberto Ierusalimschy wrote:
>>> I have definitely seen the problem on 32-bit Linux as well. So I
>>> compile ldo.c specially in luabuild. Here is the relevant part of the
>>> lakefile:
>>>
>>> -- gcc 4.6 messes up setjmp/longjmp when optimizing
>>> local ldo = c.group{LDO,defines=defs,args=def,
>>> flags=choose(CC=='gcc','-fno-omit-frame-pointer')
>>> }
>>>
>>> (point being that only this file needs the flag, and it may be GCC
>>> version specific)
>>
>> I've been sticking to Lua 5.1 on MinGW32...
>
> This seems to be a bug in the C compiler; apparently it has nothing to
> do with Lua itself. Lua 5.1 should present the same problem. (Actually
> the bug is not in the compiler itself, but in the implementation of
> longjmp/setjmp.)
>
> -- Roberto
>
>
You are right, the problem was with the compiler (TDM-GCC 4.6.? - both
Lua 5.1 and 5.2 were affected). I updated my GCC installation to TDM-GCC
4.7.1 some time ago (~1yr?) and the problem was solved IIRC.
As long as the bug is the same, simply calling `error` from the
interpreter caused the crash (most probably some bug with the
implementation of setjmp/longjmp) so it should be easy to test as soon
as I find the time to recompile Lua. I hope tomorrow or the next day.
Right now I have difficulties in keeping my eyes open - I had to wake up
at 5:00 and I worked at school from 7:30 to 19:00 + commuting time -
really an exhausting workday :-)
-- Lorenzo
--
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments