aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-11-07 16:07:17 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-11-07 16:07:17 -0200
commita113e1498d1c069e79b593aa4f8dc7030902b924 (patch)
tree251b61458f7f4fbe820186b9dddb49cb19259c33
parent17ca3b176321fb3a33f4542982e6ff3e82a3d864 (diff)
downloadlua-a113e1498d1c069e79b593aa4f8dc7030902b924.tar.gz
lua-a113e1498d1c069e79b593aa4f8dc7030902b924.tar.bz2
lua-a113e1498d1c069e79b593aa4f8dc7030902b924.zip
when checking thread consistency, check its entire stack (always
the entire stack must have valid values)
-rw-r--r--ltests.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ltests.c b/ltests.c
index 19989e82..9a8fb820 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 2.191 2014/10/30 18:53:28 roberto Exp roberto $ 2** $Id: ltests.c,v 2.192 2014/11/02 19:19:04 roberto Exp roberto $
3** Internal Module for Debugging of the Lua Implementation 3** Internal Module for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -307,9 +307,9 @@ static void checkstack (global_State *g, lua_State *L1) {
307 lua_assert(ci->top <= L1->stack_last); 307 lua_assert(ci->top <= L1->stack_last);
308 lua_assert(lua_checkpc(L1, ci)); 308 lua_assert(lua_checkpc(L1, ci));
309 } 309 }
310 if (L1->stack) { 310 if (L1->stack) { /* complete thread? */
311 for (o = L1->stack; o < L1->top; o++) 311 for (o = L1->stack; o < L1->stack_last + EXTRA_STACK; o++)
312 checkliveness(g, o); 312 checkliveness(g, o); /* entire stack must have valid values */
313 } 313 }
314 else lua_assert(L1->stacksize == 0); 314 else lua_assert(L1->stacksize == 0);
315} 315}