Run VM events and finalizers in separate state.

Reported by Sergey Kaplun. #1403
This commit is contained in:
Mike Pall
2025-11-10 18:11:26 +01:00
parent fdf2379ccb
commit 5c647754a6
7 changed files with 76 additions and 67 deletions

View File

@@ -202,6 +202,7 @@ static TValue *cpluaopen(lua_State *L, lua_CFunction dummy, void *ud)
#endif
lj_trace_initstate(g);
lj_err_verify();
setgcref(g->vmthref, obj2gco(lj_state_new(L)));
return NULL;
}