aboutsummaryrefslogtreecommitdiff
path: root/src/lj_state.c
diff options
context:
space:
mode:
authorMike Pall <mike>2024-04-19 01:33:19 +0200
committerMike Pall <mike>2024-04-19 01:33:19 +0200
commitf5affaa6c4e7524e661484f22f24255f9a83eb47 (patch)
treef31ad8fb54b3cf6e592b0ea099cb0532b3044edc /src/lj_state.c
parent7110b935672489afd6ba3eef3e5139d2f3bd05b6 (diff)
downloadluajit-f5affaa6c4e7524e661484f22f24255f9a83eb47.tar.gz
luajit-f5affaa6c4e7524e661484f22f24255f9a83eb47.tar.bz2
luajit-f5affaa6c4e7524e661484f22f24255f9a83eb47.zip
FFI: Turn FFI finalizer table into a proper GC root.
Reported by Sergey Bronnikov. #1168
Diffstat (limited to '')
-rw-r--r--src/lj_state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lj_state.c b/src/lj_state.c
index af17e4b5..6fd7d9ce 100644
--- a/src/lj_state.c
+++ b/src/lj_state.c
@@ -196,6 +196,9 @@ static TValue *cpluaopen(lua_State *L, lua_CFunction dummy, void *ud)
196 lj_lex_init(L); 196 lj_lex_init(L);
197 fixstring(lj_err_str(L, LJ_ERR_ERRMEM)); /* Preallocate memory error msg. */ 197 fixstring(lj_err_str(L, LJ_ERR_ERRMEM)); /* Preallocate memory error msg. */
198 g->gc.threshold = 4*g->gc.total; 198 g->gc.threshold = 4*g->gc.total;
199#if LJ_HASFFI
200 lj_ctype_initfin(L);
201#endif
199 lj_trace_initstate(g); 202 lj_trace_initstate(g);
200 lj_err_verify(); 203 lj_err_verify();
201 return NULL; 204 return NULL;