[libcxx-commits] [libcxx] [libc++] Add an ABI setting to harden unique_ptr<T[]>::operator[] (PR #91798)
Konstantin Varlamov via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Oct 5 19:11:12 PDT 2024
================
@@ -181,6 +181,13 @@
# define _LIBCPP_ABI_NO_COMPRESSED_PAIR_PADDING
#endif
+// Tracks the bounds of the array owned by std::unique_ptr<T[]>, allowing it to trap when accessed out-of-bounds.
+// Note that limited bounds checking is also available outside of this ABI configuration, but only some categories
+// of types can be checked.
+//
+// ABI impact: This causes the layout of std::unique_ptr<T[]> to change and its size to increase.
----------------
var-const wrote:
Looking at test comments, it also affects unordered containers, right?
https://github.com/llvm/llvm-project/pull/91798
More information about the libcxx-commits
mailing list