[llvm-branch-commits] [libcxx] Prepare libcxx and libcxxabi for pointer field protection. (PR #151651)
Louis Dionne via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Mar 25 06:55:55 PDT 2026
================
@@ -300,7 +300,7 @@ class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_TYPE_INFO_VTABLE_POINTER_AUTH type_info
protected:
typedef __type_info_implementations::__impl __impl;
- __impl::__type_name_t __type_name;
+ _LIBCPP_NO_PFP __impl::__type_name_t __type_name;
----------------
ldionne wrote:
Re baking the names of members into the ABI, do you mean that Clang would have to hardcode (for example) the knowledge of `type_info::__type_name`'s actual name so it can sign the pointers correctly when it emits a type info object in a binary (and also emit correct deactivation symbols)? And this would also mean that if we ever changed the name of the member to e.g. `type_info::__name`, then Clang would keep signing the pointer with the old name, but any code using the pointer would assume that it's operating under normal PFP, and so it would expect it to be signed as-if the name were the one used in the actual declaration (`type_info::__name`)?
https://github.com/llvm/llvm-project/pull/151651
More information about the llvm-branch-commits
mailing list