Bug: stack overflow with nesting of coroutine.close

This commit is contained in:
Roberto Ierusalimschy
2022-10-25 16:44:06 -03:00
parent b85816b9a8
commit 1e64c1391f
6 changed files with 38 additions and 6 deletions

View File

@@ -4160,7 +4160,7 @@ and then pops the top element.
}
@APIEntry{int lua_resetthread (lua_State *L);|
@APIEntry{int lua_resetthread (lua_State *L, lua_State *from);|
@apii{0,?,-}
Resets a thread, cleaning its call stack and closing all pending
@@ -4173,6 +4173,11 @@ or an error status otherwise.
In case of error,
leaves the error object on the top of the stack.
The parameter @id{from} represents the coroutine that is resetting @id{L}.
If there is no such coroutine,
this parameter can be @id{NULL}.
(This parameter was introduced in @N{release 5.4.5}.)
}
@APIEntry{int lua_resume (lua_State *L, lua_State *from, int nargs,