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

4
lvm.c
View File

@@ -362,8 +362,10 @@ void luaV_finishset (lua_State *L, const TValue *t, TValue *key,
}
t = tm; /* else repeat assignment over 'tm' */
luaV_fastset(t, key, val, hres, luaH_pset);
if (hres == HOK)
if (hres == HOK) {
luaV_finishfastset(L, t, val);
return; /* done */
}
/* else 'return luaV_finishset(L, t, key, val, slot)' (loop) */
}
luaG_runerror(L, "'__newindex' chain too long; possible loop");