lua/lua-5.4.0-bug6.patch

23 lines
855 B
Diff

diff -up lua-5.4.0/src/lvm.c.bug6 lua-5.4.0/src/lvm.c
--- lua-5.4.0/src/lvm.c.bug6 2020-07-31 10:50:38.760137542 -0400
+++ lua-5.4.0/src/lvm.c 2020-07-31 10:51:39.284498878 -0400
@@ -1104,7 +1104,7 @@ void luaV_finishOp (lua_State *L) {
#define checkGC(L,c) \
- { luaC_condGC(L, L->top = (c), /* limit of live values */ \
+ { luaC_condGC(L, (savepc(L), L->top = (c)), \
updatetrap(ci)); \
luai_threadyield(L); }
@@ -1792,8 +1792,7 @@ void luaV_execute (lua_State *L, CallInf
vmbreak;
}
vmcase(OP_VARARGPREP) {
- luaT_adjustvarargs(L, GETARG_A(i), ci, cl->p);
- updatetrap(ci);
+ ProtectNT(luaT_adjustvarargs(L, GETARG_A(i), ci, cl->p));
if (trap) {
luaD_hookcall(L, ci);
L->oldpc = 1; /* next opcode will be seen as a "new" line */