[compiler-rt] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (#138571) (PR #143230)

Anatoly Trosinenko via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 27 08:56:23 PDT 2025


================
@@ -694,7 +705,12 @@ DEFINE_LIBUNWIND_FUNCTION(__libunwind_Registers_arm64_jumpto)
   gcspushm x30
 Lnogcs:
 #endif
+
+#if __has_feature(ptrauth_calls)
+  retab
+#else
----------------
atrosinenko wrote:

By the way, if switching to `ptrauth_returns` here, we most probably want to retain compatibility with Armv8.2-a by replacing
```
#if __has_feature(ptrauth_calls)
  retab
#else
  ret    x30                    // jump to pc
#endif
```
with
```
#if __has_feature(ptrauth_returns)
  autibsp
#endif
  ret    x30                    // jump to pc
```
That is, simply insert `autibsp` into the existing code.

https://github.com/llvm/llvm-project/pull/143230


More information about the llvm-commits mailing list