[libcxx-commits] [compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)
Daniil Kovalev via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Sep 3 05:16:14 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)
----------------
kovdan01 wrote:
As far as I understand, in mainline clang we just can use regular `__ptrauth` qualifier for integer types (support implemented in your PR #137580). Given that, can we just use the piece of code below w/o the check?
```
#define __ptrauth_gcc_personality_intptr(key, addressDiscriminated, \
discriminator) \
__ptrauth(key, addressDiscriminated, discriminator)
```
I'm not sure that I understand benefits of additional `__has_feature(ptrauth_restricted_intptr_qualifier)` check, so it would be nice if you could provide an explanation why it's needed.
https://github.com/llvm/llvm-project/pull/143230
More information about the libcxx-commits
mailing list