diff options
| author | nikita <nikita@NetBSD.org> | 2023-04-17 20:33:12 +0000 |
|---|---|---|
| committer | nikita <nikita@NetBSD.org> | 2023-04-17 20:33:12 +0000 |
| commit | 04dbf2b8606395097ac5c6f8911dc76d61845142 (patch) | |
| tree | 310d5db7101db3319d988c35d5feab2316055bbe /external/mit/lua/dist/src/lcorolib.c | |
| parent | 2a916cac6d6eb7512098c303f5e80b38f6a915a8 (diff) | |
lua: apply ustream bugfix for "C-stack overflow with deep nesting of coroutine.close."
Diffstat (limited to 'external/mit/lua/dist/src/lcorolib.c')
| -rw-r--r-- | external/mit/lua/dist/src/lcorolib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/external/mit/lua/dist/src/lcorolib.c b/external/mit/lua/dist/src/lcorolib.c index a668c8ab405..41458c099e6 100644 --- a/external/mit/lua/dist/src/lcorolib.c +++ b/external/mit/lua/dist/src/lcorolib.c @@ -1,4 +1,4 @@ -/* $NetBSD: lcorolib.c,v 1.8 2023/04/16 20:46:17 nikita Exp $ */ +/* $NetBSD: lcorolib.c,v 1.9 2023/04/17 20:33:12 nikita Exp $ */ /* ** Id: lcorolib.c @@ -80,7 +80,7 @@ static int luaB_auxwrap (lua_State *L) { if (l_unlikely(r < 0)) { /* error? */ int stat = lua_status(co); if (stat != LUA_OK && stat != LUA_YIELD) { /* error in the coroutine? */ - stat = lua_resetthread(co); /* close its tbc variables */ + stat = lua_resetthread(co, L); /* close its tbc variables */ lua_assert(stat != LUA_OK); lua_xmove(co, L, 1); /* move error message to the caller */ } @@ -176,7 +176,7 @@ static int luaB_close (lua_State *L) { int status = auxstatus(L, co); switch (status) { case COS_DEAD: case COS_YIELD: { - status = lua_resetthread(co); + status = lua_resetthread(co, L); if (status == LUA_OK) { lua_pushboolean(L, 1); return 1; |
