From e3c83835e7b396ab7db538fb3b052f02d7807dee Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 30 Dec 2019 14:53:38 -0300 Subject: [PATCH] Fixed bug in 'aux_rawset' In 'aux_rawset', top must be decremented after the barrier, which refers to top-1. (Bug introduced in commit c646e57fd.) --- lapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lapi.c b/lapi.c index b49d45c9..073baa4d 100644 --- a/lapi.c +++ b/lapi.c @@ -856,9 +856,9 @@ static void aux_rawset (lua_State *L, int idx, TValue *key, int n) { t = gettable(L, idx); slot = luaH_set(L, t, key); setobj2t(L, slot, s2v(L->top - 1)); - L->top -= n; invalidateTMcache(t); luaC_barrierback(L, obj2gco(t), s2v(L->top - 1)); + L->top -= n; lua_unlock(L); }