From 1623245c3ea7422d2b311036c4a784ab18895b92 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 11 Jul 2023 13:41:32 +0200 Subject: types: treat signal handler array as GC root In order to prevent a premature release of the managed ucode signal handler callbacks, ensure to treat the containing array as GC root to mark the function values as reachable. Signed-off-by: Jo-Philipp Wich --- types.c | 1 + 1 file changed, 1 insertion(+) diff --git a/types.c b/types.c index d601479..d3aae0a 100644 --- a/types.c +++ b/types.c @@ -2279,6 +2279,7 @@ ucv_gc_common(uc_vm_t *vm, bool final) /* mark reachable objects */ ucv_gc_mark(vm->globals); ucv_gc_mark(vm->registry); + ucv_gc_mark(vm->signal.handler); ucv_gc_mark(vm->exception.stacktrace); for (i = 0; i < vm->callframes.count; i++) { -- cgit v1.2.3