From f8e401feb091bb9dee4ddd6eeb1ec46768eee89f Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Mon, 9 Oct 2017 13:16:50 +1100 Subject: [PATCH] Apply Lua.org patch Lua does not check GC when creating error messages. reported by Viacheslav Usov on 06 Jul 2017. existed since 5.3.2. Example: See https://www.lua.org/bugs.html#5.3.4-4. --- src/lua/ldebug.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lua/ldebug.cpp b/src/lua/ldebug.cpp index 239affb76c528..60d2b6f47f719 100644 --- a/src/lua/ldebug.cpp +++ b/src/lua/ldebug.cpp @@ -653,6 +653,7 @@ l_noret luaG_runerror (lua_State *L, const char *fmt, ...) { CallInfo *ci = L->ci; const char *msg; va_list argp; + luaC_checkGC(L); /* error message uses memory */ va_start(argp, fmt); msg = luaO_pushvfstring(L, fmt, argp); /* format message */ va_end(argp);