shared/runtime/gchelper_native: Fix pointer cast on x86_64.

gc_helper_collect_regs_and_stack() is casting a pointer to uint32_t; the
variables involved are always pointers so it should be using uintptr_t.
This commit is contained in:
Simon Arlott 2022-11-01 12:20:08 +00:00 committed by Damien George
parent 5987130afd
commit 43dd3ea74d

View File

@ -41,7 +41,7 @@ MP_NOINLINE void gc_helper_collect_regs_and_stack(void) {
uintptr_t sp = gc_helper_get_regs_and_sp(regs);
// trace the stack, including the registers (since they live on the stack in this function)
gc_collect_root((void **)sp, ((uint32_t)MP_STATE_THREAD(stack_top) - sp) / sizeof(uint32_t));
gc_collect_root((void **)sp, ((uintptr_t)MP_STATE_THREAD(stack_top) - sp) / sizeof(uintptr_t));
}
#endif