Fix reporting of an error during error handling.

Reported by Sergey Kaplun. #1381
This commit is contained in:
Mike Pall
2025-10-16 13:11:02 +02:00
parent 871db2c84e
commit 54a162688e
2 changed files with 11 additions and 0 deletions

View File

@@ -195,6 +195,7 @@ static TValue *cpluaopen(lua_State *L, lua_CFunction dummy, void *ud)
lj_meta_init(L);
lj_lex_init(L);
fixstring(lj_err_str(L, LJ_ERR_ERRMEM)); /* Preallocate memory error msg. */
fixstring(lj_err_str(L, LJ_ERR_ERRERR)); /* Preallocate err in err msg. */
g->gc.threshold = 4*g->gc.total;
#if LJ_HASFFI
lj_ctype_initfin(L);