[libcxx-commits] [libcxx] [libc++] Use __wrap_iter in string_view and array in the unstable ABI (PR #74482)

Christopher Di Bella via libcxx-commits libcxx-commits at lists.llvm.org
Tue Dec 5 11:13:42 PST 2023


================
@@ -168,6 +168,12 @@
 // pointer from 16 to 8. This changes the output of std::string::max_size,
 // which makes it ABI breaking
 #    define _LIBCPP_ABI_STRING_8_BYTE_ALIGNMENT
+// Define std::array iterators to be __wrap_iters instead of raw pointers, which
+// prevents people from relying on a non-portable implementation detail.
----------------
cjdb wrote:

I'd suggest the motivation focus on the hardening opportunities. The portability aspect is nice, but framing this as potentially closing up security vulnerabilities makes this a lot more appealing.

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


More information about the libcxx-commits mailing list