diff --git a/src/stackwalk.c b/src/stackwalk.c index 251e408c7fd2dc..d585a2557c2e98 100644 --- a/src/stackwalk.c +++ b/src/stackwalk.c @@ -992,7 +992,13 @@ int jl_simulate_longjmp(jl_jmp_buf mctx, bt_context_t *c) JL_NOTSAFEPOINT #endif #elif defined(_OS_LINUX_) && defined(__GLIBC__) __jmp_buf *_ctx = &mctx->__jmpbuf; + #if defined(_OS_LINUX_) && defined(_CPU_AARCH64_) + // Only on aarch64-linux libunwind uses a different struct than system's one: + // . + struct unw_sigcontext *mc = &c->uc_mcontext; + #else mcontext_t *mc = &c->uc_mcontext; + #endif #if defined(_CPU_X86_) // https://github.com/bminor/glibc/blame/master/sysdeps/i386/__longjmp.S // https://github.com/bminor/glibc/blame/master/sysdeps/i386/jmpbuf-offsets.h