lua/lua-5.3.4-bug6.patch
Petr Šabata ac515e8d0a RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/lua#3e03dd9b69dff7f2f87fff9e2f8cc2403fea046a
2020-10-15 18:42:25 +02:00

24 lines
634 B
Diff

diff -up lua-5.3.4/src/lapi.c.bug6 lua-5.3.4/src/lapi.c
--- lua-5.3.4/src/lapi.c.bug6 2018-02-13 10:18:59.386451581 -0500
+++ lua-5.3.4/src/lapi.c 2018-02-13 10:19:42.700575448 -0500
@@ -533,6 +533,7 @@ LUA_API void lua_pushcclosure (lua_State
lua_lock(L);
if (n == 0) {
setfvalue(L->top, fn);
+ api_incr_top(L);
}
else {
CClosure *cl;
@@ -546,9 +547,9 @@ LUA_API void lua_pushcclosure (lua_State
/* does not need barrier because closure is white */
}
setclCvalue(L, L->top, cl);
+ api_incr_top(L);
+ luaC_checkGC(L);
}
- api_incr_top(L);
- luaC_checkGC(L);
lua_unlock(L);
}