aboutsummaryrefslogtreecommitdiff
path: root/lgc.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-07-07 10:32:19 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-07-07 10:32:19 -0300
commit9e05503ffaf915ea30cf349ad52eae9fe17db4fc (patch)
tree59aeb20b3783921225daaae65c556a41e93b3cb2 /lgc.c
parent17f695157cbffa67f39352dadd2d2e34322b73f0 (diff)
downloadlua-9e05503ffaf915ea30cf349ad52eae9fe17db4fc.tar.gz
lua-9e05503ffaf915ea30cf349ad52eae9fe17db4fc.tar.bz2
lua-9e05503ffaf915ea30cf349ad52eae9fe17db4fc.zip
bug: C functions also may have stacks larger than current top
Diffstat (limited to 'lgc.c')
-rw-r--r--lgc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lgc.c b/lgc.c
index 6f9a7559..a0e1bcdb 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.c,v 1.172 2003/04/28 19:26:16 roberto Exp roberto $ 2** $Id: lgc.c,v 1.173 2003/05/16 18:58:39 roberto Exp roberto $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -233,8 +233,7 @@ static void traversestack (GCState *st, lua_State *L1) {
233 for (ci = L1->base_ci; ci <= L1->ci; ci++) { 233 for (ci = L1->base_ci; ci <= L1->ci; ci++) {
234 lua_assert(ci->top <= L1->stack_last); 234 lua_assert(ci->top <= L1->stack_last);
235 lua_assert(ci->state & (CI_C | CI_HASFRAME | CI_SAVEDPC)); 235 lua_assert(ci->state & (CI_C | CI_HASFRAME | CI_SAVEDPC));
236 if (!(ci->state & CI_C) && lim < ci->top) 236 if (lim < ci->top) lim = ci->top;
237 lim = ci->top;
238 } 237 }
239 for (o = L1->stack; o < L1->top; o++) 238 for (o = L1->stack; o < L1->top; o++)
240 markobject(st, o); 239 markobject(st, o);