diff options
author | Simon Arlott <sa.me.uk> | 2022-11-01 12:20:08 +0000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-11-08 19:15:37 +1100 |
commit | 43dd3ea74dad79dc144d03a1caba8a4f220a5b27 (patch) | |
tree | 24dc9212fc4a4814683ba743e55d2b26d56fc8fc /shared | |
parent | 5987130afdf1063f06d5bf3c8826d36435834649 (diff) |
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.
Diffstat (limited to 'shared')
-rw-r--r-- | shared/runtime/gchelper_native.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shared/runtime/gchelper_native.c b/shared/runtime/gchelper_native.c index 1e4af9c84..dbab8d601 100644 --- a/shared/runtime/gchelper_native.c +++ b/shared/runtime/gchelper_native.c @@ -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 |