aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2021-02-09 14:00:05 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2021-02-09 14:00:05 -0300
commit4e47f81188d37e29027158b76271d02a781242e2 (patch)
treec360912d1901acf8371390cc1f716278e5d91bb4 /ltests.c
parentc63e5d212bc5dec1b1c749e3f07b42cd83081826 (diff)
downloadlua-4e47f81188d37e29027158b76271d02a781242e2.tar.gz
lua-4e47f81188d37e29027158b76271d02a781242e2.tar.bz2
lua-4e47f81188d37e29027158b76271d02a781242e2.zip
New implementation for to-be-closed variables
To-be-closed variables are linked in their own list, embedded into the stack elements. (Due to alignment, this information does not change the size of the stack elements in most architectures.) This new list does not produce garbage and avoids memory errors when creating tbc variables.
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ltests.c b/ltests.c
index 9c13338a..da95d027 100644
--- a/ltests.c
+++ b/ltests.c
@@ -446,6 +446,7 @@ static void checkstack (global_State *g, lua_State *L1) {
446 for (uv = L1->openupval; uv != NULL; uv = uv->u.open.next) 446 for (uv = L1->openupval; uv != NULL; uv = uv->u.open.next)
447 assert(upisopen(uv)); /* must be open */ 447 assert(upisopen(uv)); /* must be open */
448 assert(L1->top <= L1->stack_last); 448 assert(L1->top <= L1->stack_last);
449 assert(L1->tbclist <= L1->top);
449 for (ci = L1->ci; ci != NULL; ci = ci->previous) { 450 for (ci = L1->ci; ci != NULL; ci = ci->previous) {
450 assert(ci->top <= L1->stack_last); 451 assert(ci->top <= L1->stack_last);
451 assert(lua_checkpc(ci)); 452 assert(lua_checkpc(ci));