From 86b39206d998a184a105bfb63b630ed28e1c81bc Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 3 Oct 2012 09:36:46 -0300 Subject: open upvalues cannot be old if thread is not old; when thread is old, their list is not traversed anymore, and therefore can contain dead elements. --- ltests.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index 1bbeac1c..17833ec5 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.132 2012/07/04 15:52:38 roberto Exp roberto $ +** $Id: ltests.c,v 2.133 2012/08/16 17:34:28 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -469,9 +469,7 @@ int lua_checkmemory (lua_State *L) { lua_assert(uv->u.l.next->u.l.prev == uv && uv->u.l.prev->u.l.next == uv); lua_assert(uv->v != &uv->u.value); /* must be open */ lua_assert(!isblack(obj2gco(uv))); /* open upvalues are never black */ - if (isdead(g, obj2gco(uv))) - lua_assert(issweepphase(g)); - else + if (!isdead(g, obj2gco(uv))) checkvalref(g, obj2gco(uv), uv->v); } return 0; -- cgit v1.2.3-55-g6feb