lua

A copy of the Lua development repository
Log | Files | Refs | README

commit a113e1498d1c069e79b593aa4f8dc7030902b924
parent 17ca3b176321fb3a33f4542982e6ff3e82a3d864
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Fri,  7 Nov 2014 16:06:52 -0200

when checking thread consistency, check its entire stack (always
the entire stack must have valid values)

Diffstat:
Mltests.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ltests.c b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.191 2014/10/30 18:53:28 roberto Exp roberto $ +** $Id: ltests.c,v 2.192 2014/11/02 19:19:04 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -307,9 +307,9 @@ static void checkstack (global_State *g, lua_State *L1) { lua_assert(ci->top <= L1->stack_last); lua_assert(lua_checkpc(L1, ci)); } - if (L1->stack) { - for (o = L1->stack; o < L1->top; o++) - checkliveness(g, o); + if (L1->stack) { /* complete thread? */ + for (o = L1->stack; o < L1->stack_last + EXTRA_STACK; o++) + checkliveness(g, o); /* entire stack must have valid values */ } else lua_assert(L1->stacksize == 0); }