lua-users home
lua-l archive

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

On Monday, September 6th, 2021 at 6:13 AM, Roberto Ierusalimschy <> wrote:

> > > If you compile luac with -DLUAI_ASSERT then `luac -l <file>` will no longer work.
> > Thanks for the report.
> >
> > For the time being, add this line at the top of luac.c:
> >
> > #undef LUAI_ASSERT
> Better yet, you can fix the bug by removing the option -DLUAI_ASSERT.

Note, neither of these solutions would result in finding the memory leak in luac when compiling multiple sources files together.

To find it, at least using the ltests.h/c memory checking, one would have to resolve all of the asserts due to the various GETARG_* functions and then realize that the combine function should have a call to luaM_freearray(L, f->lineinfo, f->sizelineinfo); before setting f->sizelineinfo to zero.

Obviously, I think it would be beneficial to have luac run cleanly when using all of the internal debugging features, there are clearly bugs and the internal debugging clearly finds them, they just need to be run.