diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-10-25 16:44:06 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-10-25 16:44:06 -0300 |
| commit | 1e64c1391f9a14115b5cc82066dbf545ae73ee27 (patch) | |
| tree | 4aa3b6c2854c920ed825bf9fe46d275826e5ab6e /lstate.c | |
| parent | b85816b9a884cbe4cfd139a8e11ffc28ecead576 (diff) | |
| download | lua-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -343,9 +343,10 @@ int luaE_resetthread (lua_State *L, int status) { | |||
| 343 | } | 343 | } |
| 344 | 344 | ||
| 345 | 345 | ||
| 346 | LUA_API int lua_resetthread (lua_State *L) { | 346 | LUA_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; |
