[libcxx-commits] [libcxx] [libcxxabi] [libc++] Upstream ptrauth support in libc++ and libc++abi (PR #84573)

Ahmed Bougacha via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 8 15:58:01 PST 2024


================
@@ -51,6 +51,21 @@
 #include <atomic>
 #endif
 
+#if __has_feature(ptrauth_calls)
+#include <ptrauth.h>
+#endif
+
+
+template<typename T>
+static inline
+T *
+get_vtable(T *vtable) {
+#if __has_feature(ptrauth_calls)
----------------
ahmedbougacha wrote:

The dynamic_cast machinery had to strip but `__builtin_get_vtable` always authenticates, so as-is this probably needs to be a manual `ptrauth_strip` yeah

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


More information about the libcxx-commits mailing list