summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2023-07-11 13:41:32 +0200
committerJo-Philipp Wich <jo@mein.io>2023-07-27 13:59:32 +0200
commit1623245c3ea7422d2b311036c4a784ab18895b92 (patch)
tree3d93206c779a56a065fe6a8eec6f2f5baafd63a7
parent29b1c0deba8487d1d7ad86242a1a5e90aa775218 (diff)
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 <jo@mein.io>
-rw-r--r--types.c1
1 files changed, 1 insertions, 0 deletions
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++) {