From 6cb68c3a17ba0022b2ecffd1016bbfd00e43021f Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sun, 15 Dec 2019 00:05:30 +0100 Subject: [PATCH] arm64: fix some casts in the new common backtrace/context code. --- tccrun.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tccrun.c b/tccrun.c index b76f9fa..e8e56f8 100644 --- a/tccrun.c +++ b/tccrun.c @@ -597,7 +597,7 @@ static void rt_getcontext(ucontext_t *uc, rt_context *rc) rc->sp = uc->uc_mcontext.arm_sp; #elif defined(__aarch64__) rc->ip = uc->uc_mcontext.pc; - rc->fp = (addr_t *)uc->uc_mcontext.regs[29]; + rc->fp = uc->uc_mcontext.regs[29]; #endif } @@ -760,7 +760,7 @@ static int rt_get_caller_pc(addr_t *paddr, rt_context *rc, int level) if (level == 0) { *paddr = rc->ip; } else { - addr_t *fp = rc->fp; + addr_t *fp = (addr_t*)rc->fp; while (--level) fp = (addr_t *)fp[0]; *paddr = fp[1];