From 2e4e888de02d248fc2688dd740de92f8f4f56656 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 21 Nov 2002 13:46:20 -0200 Subject: [PATCH] Lua functions must have a frame or a saved pc. --- lgc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lgc.c b/lgc.c index 6c33df95..d77b1a47 100644 --- a/lgc.c +++ b/lgc.c @@ -1,5 +1,5 @@ /* -** $Id: lgc.c,v 1.159 2002/11/18 11:01:55 roberto Exp roberto $ +** $Id: lgc.c,v 1.160 2002/11/21 14:17:15 roberto Exp roberto $ ** Garbage Collector ** See Copyright Notice in lua.h */ @@ -237,6 +237,7 @@ static void traversestack (GCState *st, lua_State *L1) { lim = L1->top; for (ci = L1->base_ci; ci <= L1->ci; ci++) { lua_assert(ci->top <= L1->stack_last); + lua_assert(ci->state & (CI_C | CI_HASFRAME | CI_SAVEDPC)); if (!(ci->state & CI_C) && lim < ci->top) lim = ci->top; }