update lua 5.4.2

This commit is contained in:
Cloud Wu
2020-11-16 10:51:36 +08:00
parent c7dc8751c7
commit 9eb37198ea
8 changed files with 64 additions and 77 deletions

View File

@@ -634,8 +634,8 @@ static int traversethread (global_State *g, lua_State *th) {
for (uv = th->openupval; uv != NULL; uv = uv->u.open.next)
markobject(g, uv); /* open upvalues cannot be collected */
if (g->gcstate == GCSatomic) { /* final traversal? */
for (; o < th->stack_last; o++) /* clear not-marked stack slice */
setnilvalue(s2v(o));
for (; o < th->stack_last + EXTRA_STACK; o++)
setnilvalue(s2v(o)); /* clear dead stack slice */
/* 'remarkupvals' may have removed thread from 'twups' list */
if (!isintwups(th) && th->openupval != NULL) {
th->twups = g->twups; /* link it back to the list */