mirror of
https://github.com/lua/lua
synced 2026-09-27 00:28:25 +03:00
Fixed some bugs around stack reallocation
Long time without using HARDSTACKTESTS...
This commit is contained in:
parent
e500892e18
commit
2bfa13e520
4 changed files with 6 additions and 1 deletions
2
lfunc.c
2
lfunc.c
|
|
@ -190,9 +190,11 @@ void luaF_close (lua_State *L, StkId level, int status, int yy) {
|
|||
UpVal *uv;
|
||||
StkId upl; /* stack index pointed by 'uv' */
|
||||
if (unlikely(status == LUA_ERRMEM && L->ptbc != NULL)) {
|
||||
ptrdiff_t levelrel = savestack(L, level);
|
||||
upl = L->ptbc;
|
||||
L->ptbc = NULL; /* remove from "list" before closing */
|
||||
prepcallclosemth(L, upl, status, yy);
|
||||
level = restorestack(L, levelrel);
|
||||
}
|
||||
else
|
||||
lua_assert(L->ptbc == NULL); /* must be empty for other status */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue