[libcxx-commits] [compiler-rt] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (#138571) (PR #143230)
Anatoly Trosinenko via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 6 12:51:03 PDT 2025
================
@@ -30,6 +30,45 @@ EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD, void *, PCONTEXT,
_Unwind_Personality_Fn);
#endif
+#if __has_feature(ptrauth_qualifier)
+#include <ptrauth.h>
+#if __has_feature(ptrauth_restricted_intptr_qualifier)
+#define __ptrauth_gcc_personality_intptr(key, addressDiscriminated, \
----------------
atrosinenko wrote:
I like the idea of not checking for `__has_include(<ptrauth.h>)` separately and instead gluing `#include <ptrauth.h>` unconditionally to its users, which are usually already guarded with some `__has_feature(...)` test. I wonder if this pattern can be used in more places affected by this patch.
https://github.com/llvm/llvm-project/pull/143230
More information about the libcxx-commits
mailing list