[llvm-branch-commits] [libcxx] Prepare libcxx and libcxxabi for pointer field protection. (PR #151651)
Peter Collingbourne via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Dec 4 14:49:32 PST 2025
================
@@ -34,10 +34,13 @@ template <class _Tp, class = void>
struct __libcpp_is_trivially_relocatable : is_trivially_copyable<_Tp> {};
#endif
+// __trivially_relocatable on libc++'s builtin types does not currently return the right answer with PFP.
----------------
pcc wrote:
I looked at all the types and I think they would all be non-trivially-relocatable with PFP because they can all contain pointer fields.
We could surround each `using __trivially_relocatable` with an `#ifndef __POINTER_FIELD_PROTECTION__`, but that could make it easier to accidentally introduce a PFP-incompatible type, which would hopefully be detectable via testing, but it's possible that the tests will not trigger the bug. Disabling it like this seemed like the most robust approach.
https://github.com/llvm/llvm-project/pull/151651
More information about the llvm-branch-commits
mailing list