Handling of memory errors when creating to-be-closed upvalues

This commit is contained in:
Roberto Ierusalimschy
2018-10-18 16:15:09 -03:00
parent bd96330d03
commit 3c7dc52909
4 changed files with 150 additions and 42 deletions

3
lvm.c
View File

@@ -1456,8 +1456,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
vmbreak;
}
vmcase(OP_TBC) {
UpVal *up = luaF_findupval(L, ra); /* create new upvalue */
up->tt = LUA_TUPVALTBC; /* mark it to be closed */
luaF_newtbcupval(L, ra); /* create new to-be-closed upvalue */
vmbreak;
}
vmcase(OP_JMP) {