[llvm-branch-commits] Prepare libcxx and libcxxabi for pointer field protection. (PR #151651)

Peter Collingbourne via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Sep 10 11:32:42 PDT 2025


================
@@ -484,8 +484,21 @@ typedef __char32_t char32_t;
 #    define _LIBCPP_EXCEPTIONS_SIG e
 #  endif
 
+#  if !_LIBCPP_HAS_EXCEPTIONS
+#    define _LIBCPP_EXCEPTIONS_SIG n
+#  else
+#    define _LIBCPP_EXCEPTIONS_SIG e
+#  endif
+
+#  if defined(__POINTER_FIELD_PROTECTION__)
+#    define _LIBCPP_PFP_SIG p
+#  else
+#    define _LIBCPP_PFP_SIG
+#  endif
----------------
pcc wrote:

Yes, the in-memory pointer format changes so it's effectively a layout (ABI) change. Therefore we need an ABI tag change to detect/prevent linking against mismatching ABIs. This was requested by @mordante in #133538.

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


More information about the llvm-branch-commits mailing list