diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-11-07 16:07:17 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-11-07 16:07:17 -0200 |
commit | a113e1498d1c069e79b593aa4f8dc7030902b924 (patch) | |
tree | 251b61458f7f4fbe820186b9dddb49cb19259c33 | |
parent | 17ca3b176321fb3a33f4542982e6ff3e82a3d864 (diff) | |
download | lua-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 | } |