Missing GC barrier in 'luaV_finishset'

This commit is contained in:
Roberto Ierusalimschy
2025-03-14 12:37:19 -03:00
parent 22974326ca
commit c2dc6e8e94
3 changed files with 19 additions and 3 deletions

3
lapi.c
View File

@@ -888,9 +888,8 @@ LUA_API void lua_settable (lua_State *L, int idx) {
api_checkpop(L, 2);
t = index2value(L, idx);
luaV_fastset(t, s2v(L->top.p - 2), s2v(L->top.p - 1), hres, luaH_pset);
if (hres == HOK) {
if (hres == HOK)
luaV_finishfastset(L, t, s2v(L->top.p - 1));
}
else
luaV_finishset(L, t, s2v(L->top.p - 2), s2v(L->top.p - 1), hres);
L->top.p -= 2; /* pop index and value */