lua-users home
lua-l archive

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

Your crash is happening inside the garbage collector. I suspect you're
corrupting memory earlier in the program, and that lua_pcall on Win64
is just the trigger for the crash rather than the true cause. Try
defining LUA_USE_APICHECK, compiling with Clang's sanitizers enabled,
and running the Linux build under valgrind. Hopefully, one of those
will reveal the actual faulty line.

Joseph C. Sible

On Thu, Dec 3, 2020 at 9:44 AM Vadim Peretokin <> wrote:
> Hi all,
> I have Lua 5.1.5 successfully embedded in 32bit Windows and 64bit macOS and Linux in Mudlet, and am attempting to make a 64bit build. Lua builds and runs fine, but has a chance to occasionally crash on lua_pcall.
> I'm building with Mingw-w64 8.1.0 (MSVC is not an option), and the applications runs just fine in other environments. The arguments to pcall as pretty simple as well and not complicated: `lua_pcall(L, 2, LUA_MULTRET, 0);`
> Attached is a stacktrace I see, and code is here if it helps.
> What could be the reason for this?