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

Daniil Kovalev via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 18 01:52:39 PDT 2025


================
@@ -541,7 +554,33 @@ struct scan_results
 };
 
 }  // unnamed namespace
+}
 
+namespace {
+// The logical model for casting authenticated function pointers makes
+// it impossible to directly cast them without breaking the authentication,
+// as a result we need this pair of helpers.
+template <typename PtrType>
+void set_landing_pad_as_ptr(scan_results& results, const PtrType& out) {
----------------
kovdan01 wrote:

`PtrType` seems to always be a ... pointer type :) So, probably, you can just pass by value instead of using const l-value reference.

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


More information about the llvm-commits mailing list