From a6e06417785288f66c990e828cccbf9fb9836ba7 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 29 Nov 2024 14:00:09 +0100 Subject: vm: resolve upvalues before pushing them onto the stack Commit e5fe6b1 ("treewide: refactor vector usage code") accidentially dropped the upvalue resolving logic from uc_vm_stack_push(), leading to unresolved upvalues leaking into the script execution context. Fixes: e5fe6b1 ("treewide: refactor vector usage code") Signed-off-by: Jo-Philipp Wich --- vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vm.c') diff --git a/vm.c b/vm.c index 3dd054b..9488288 100644 --- a/vm.c +++ b/vm.c @@ -431,7 +431,7 @@ uc_vm_resolve_upval(uc_vm_t *vm, uc_value_t *value) void uc_vm_stack_push(uc_vm_t *vm, uc_value_t *value) { - uc_vector_push(&vm->stack, value); + uc_vector_push(&vm->stack, uc_vm_resolve_upval(vm, value)); if (vm->trace) { fprintf(stderr, " [+%zd] %s\n", -- cgit v1.2.3