mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 15:14:08 +00:00
FFI: Treat cdata finalizer table as a GC root.
Thanks to Sergey Bronnikov. #1168
This commit is contained in:
parent
88ed9fdbbb
commit
dda1ac273a
@ -93,6 +93,9 @@ static void gc_mark_start(global_State *g)
|
||||
gc_markobj(g, tabref(mainthread(g)->env));
|
||||
gc_marktv(g, &g->registrytv);
|
||||
gc_mark_gcroot(g);
|
||||
#if LJ_HASFFI
|
||||
if (ctype_ctsG(g)) gc_markobj(g, ctype_ctsG(g)->finalizer);
|
||||
#endif
|
||||
g->gc.state = GCSpropagate;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user