diff options
Diffstat (limited to 'lgc.c')
-rw-r--r-- | lgc.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -126,6 +126,12 @@ static void markstacks (GCState *st) { | |||
126 | lua_State *L1 = st->L; | 126 | lua_State *L1 = st->L; |
127 | do { /* for each thread */ | 127 | do { /* for each thread */ |
128 | StkId o, lim; | 128 | StkId o, lim; |
129 | if (L1->base_ci == NULL) { /* incomplete state? */ | ||
130 | lua_assert(L1 != st->L); | ||
131 | L1 = L1->next; | ||
132 | luaE_closethread(st->L, L1->previous); /* collect it */ | ||
133 | continue; | ||
134 | } | ||
129 | for (o=L1->stack; o<L1->top; o++) | 135 | for (o=L1->stack; o<L1->top; o++) |
130 | markobject(st, o); | 136 | markobject(st, o); |
131 | lim = (L1->stack_last - L1->ci->base > MAXSTACK) ? L1->ci->base+MAXSTACK | 137 | lim = (L1->stack_last - L1->ci->base > MAXSTACK) ? L1->ci->base+MAXSTACK |