[libcxx-commits] [libcxx] [z/OS][libc++] Guard to be used only when `align_val_t` is available (PR #114396)

Zibi Sarbinowski via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 7 06:39:45 PST 2024


================
@@ -75,7 +75,7 @@ class __small_buffer {
   template <class _Stored>
   _LIBCPP_HIDE_FROM_ABI void __dealloc() noexcept {
     if constexpr (!__fits_in_buffer<_Stored>)
-      ::operator delete[](*reinterpret_cast<void**>(__buffer_), sizeof(_Stored), align_val_t{alignof(_Stored)});
+      std::__libcpp_deallocate(*reinterpret_cast<void**>(__buffer_), _BufferSize * sizeof(byte), alignof(_Stored));
----------------
zibi2 wrote:

Thank you for pointing out this. The good part is that this issue was also caught by stage3 sanitizer failure.  

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


More information about the libcxx-commits mailing list