aboutsummaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2022-10-25 16:44:06 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2022-10-25 16:44:06 -0300
commit1e64c1391f9a14115b5cc82066dbf545ae73ee27 (patch)
tree4aa3b6c2854c920ed825bf9fe46d275826e5ab6e /lstate.c
parentb85816b9a884cbe4cfd139a8e11ffc28ecead576 (diff)
downloadlua-1e64c1391f9a14115b5cc82066dbf545ae73ee27.tar.gz
lua-1e64c1391f9a14115b5cc82066dbf545ae73ee27.tar.bz2
lua-1e64c1391f9a14115b5cc82066dbf545ae73ee27.zip
Bug: stack overflow with nesting of coroutine.close
Diffstat (limited to 'lstate.c')
-rw-r--r--lstate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lstate.c b/lstate.c
index 1ffe1a0f..4b5c1000 100644
--- a/lstate.c
+++ b/lstate.c
@@ -343,9 +343,10 @@ int luaE_resetthread (lua_State *L, int status) {
343} 343}
344 344
345 345
346LUA_API int lua_resetthread (lua_State *L) { 346LUA_API int lua_resetthread (lua_State *L, lua_State *from) {
347 int status; 347 int status;
348 lua_lock(L); 348 lua_lock(L);
349 L->nCcalls = (from) ? getCcalls(from) : 0;
349 status = luaE_resetthread(L, L->status); 350 status = luaE_resetthread(L, L->status);
350 lua_unlock(L); 351 lua_unlock(L);
351 return status; 352 return status;