From 4d871ee973394a0d629894226f2817b3803de205 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 30 Apr 2010 15:37:14 -0300 Subject: "gray lists" only need to be valid when 'keepinvariant' is true --- ltests.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index d302b97b..5764a7fa 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.97 2010/04/29 17:33:51 roberto Exp roberto $ +** $Id: ltests.c,v 2.98 2010/04/29 21:42:33 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -380,6 +380,7 @@ static void checkgraylist (GCObject *l) { static void markgrays (global_State *g) { + if (!keepinvariant(g)) return; checkgraylist(g->gray); checkgraylist(g->grayagain); checkgraylist(g->weak); @@ -399,7 +400,7 @@ int lua_checkmemory (lua_State *L) { for (o = g->allgc; o != NULL; o = gch(o)->next) { checkobject(g, o); if (isgray(o)) { - lua_assert(issweepphase(g) || testbit(o->gch.marked, GRAYBIT)); + lua_assert(!keepinvariant(g) || testbit(o->gch.marked, GRAYBIT)); o->gch.marked = resetbit(o->gch.marked, GRAYBIT); } lua_assert(!testbit(o->gch.marked, SEPARATED)); -- cgit v1.2.3-55-g6feb