[compiler-rt] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (#138571) (PR #143230)
Anatoly Trosinenko via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 30 06:40:43 PDT 2025
================
@@ -681,7 +681,18 @@ DEFINE_LIBUNWIND_FUNCTION(__libunwind_Registers_arm64_jumpto)
// context struct, because it is allocated on the stack, and an exception
// could clobber the de-allocated portion of the stack after sp has been
// restored.
- ldr x16, [x0, #0x0F8]
+
+ ldr x16, [x0, #0x0F8] // load sp into scratch
+ ldr lr, [x0, #0x100] // restore pc into lr
+
+#if __has_feature(ptrauth_calls)
+ // The LR is signed with its address inside the register state. Time
+ // to resign to be a regular ROP signed pointer
----------------
atrosinenko wrote:
[nit] Probably something else was intended instead of `ROP signed pointer`.
https://github.com/llvm/llvm-project/pull/143230
More information about the llvm-commits
mailing list