================
@@ -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:

memcpy cannot be used -> these are address discriminated values, the entire 
reason for these hoops is to deal with this problem.

https://github.com/llvm/llvm-project/pull/143230
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to