lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Sep 27, 2012 at 9:52 AM, John Dunn <John_Dunn@qscaudio.com> wrote:
>> Lua does check the collector when it creates error messages, and so the collector does not get a chance to run.
>> The error causes Lua to skip that check, too. Replacing that check solves both problems:
>>
>> *** ldo.c:
>> 313a314
>> >       luaC_checkGC(L);  /* stack grow uses memory */
>> 340a342
>> >       luaC_checkGC(L);  /* stack grow uses memory */
>> 396d397
>> <   luaC_checkGC(L);
>
> Are you saying that I can modify ldo.c to address the issue? I only see one call to luaC_check(L) which is on line 396 in luaD_call. What exactly should I change?

The > means "add this line" and the < means "remove this line". You
want to add those two lines after line 313 (the new line will be line
314) and after what used to be line 340 (the new line will be line
342), and then remove the one that was originally on line 396.

/s/ Adam