[libcxx-commits] [libcxx] [libc++][ranges][abi-break] Fix `movable_box` overwriting memory of data that lives in the tail padding (PR #71314)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Dec 22 09:24:38 PST 2023
================
@@ -200,6 +200,18 @@
# define _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
# endif
+# ifndef _LIBCPP_NO_ABI_TAG
+// We had some bugs where we use [[no_unique_address]] together with construct_at,
+// which causes UB as the call on construct_at could write to overlapping subobjects
+//
+// https://github.com/llvm/llvm-project/issues/70506
+// https://github.com/llvm/llvm-project/issues/70494
+//
+// To fix the bug we had to change the ABI of some classes to remove [[no_unique_address]] under certain conditions.
+// The below macro is used for all classes that have ABI changed as part of the bug fix
----------------
ldionne wrote:
```suggestion
// The below macro is used for all classes whose ABI has changed as part of the fixing these bugs.
```
https://github.com/llvm/llvm-project/pull/71314
More information about the libcxx-commits
mailing list