[libcxx-commits] [libcxx] [libcxx] Align allocation to match `__set_long_cap` and `__get_long_cap` (PR #90292)
Vitaly Buka via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 30 11:13:07 PDT 2024
================
@@ -1876,6 +1876,7 @@ private:
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __set_long_cap(size_type __s) _NOEXCEPT {
__r_.first().__l.__cap_ = __s / __endian_factor;
__r_.first().__l.__is_long_ = true;
+ _LIBCPP_ASSERT_INTERNAL(__s == __get_long_cap(), "Size must be __endian_factor aligned.");
----------------
vitalybuka wrote:
@philnik777
Note, this assert is enough to reproduce the issue on `LIT_FILTER=string ninja check-cxx`, in case it would be easy for you do debug yourself.
https://github.com/llvm/llvm-project/pull/90292
More information about the libcxx-commits
mailing list