diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-08-12 00:51:41 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-08-12 01:03:00 +0200 |
commit | 381cc7508f797e5158bbd1620d6154ef4a11b76c (patch) | |
tree | d336aa85dd93f4fc59c49c6502ac1877cc8948cf | |
parent | d0ae9106307343298c926ed065c19609aa37a001 (diff) |
types: treat vm->exports as GC roots
We must not free objects being in the module export registry.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | types.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2220,6 +2220,9 @@ ucv_gc_common(uc_vm_t *vm, bool final) for (i = 0; i < vm->restypes.count; i++) ucv_gc_mark(vm->restypes.entries[i]->proto); + + for (i = 0; i < vm->exports.count; i++) + ucv_gc_mark(vm->exports.entries[i]->value); } /* unref unreachable objects */ |