On Sat, Jan 6, 2024 at 10:26 PM Luca <l...@orpolo.org> wrote: > Uhm, I still have an issue, although a bit different now: > > By the way, the exception is still the same (General Protection, which > is usually forwarded to user space), but for a different reason, > apparently a non-canonical address in $rax=0x8000020175c0
I think this is just that you now have to add 2, not 1, to the result of __builtin_frame_address(). Or better, do what I did in glibc, change it to an explicit function argument [0], since __builtin_frame_address() doesn't return a useful (for this purpose) value on aarch64. [0]: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=24b707c1665afae7eb302542ffa92d53aa577111 Sergey