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

Oliver Hunt via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 7 15:53:29 PDT 2025


================
@@ -90,6 +90,18 @@
   } while (0)
 #endif
 
+// There is not currently a clean way to cast between an authenticated
+// integer and an authenticated function pointer, so we need this helper
+// function to keep things clean.
+static _Unwind_Personality_Fn get_handler_function(unw_proc_info_t *frameInfo) {
+  union {
+    void *opaque_handler;
+    _Unwind_Personality_Fn __ptrauth_unwind_upi_handler *handler;
+  } u;
+  u.opaque_handler = (void *)&frameInfo->handler;
+  return *u.handler;
----------------
ojhunt wrote:

The alternative is to force a copy + re-sign

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


More information about the llvm-commits mailing list