[libcxx-commits] [libcxx] [libc++] Remove _LIBCPP_COMPRESSED_PAIR from packaged_task (PR #200642)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 17 08:19:33 PDT 2026
================
@@ -1435,8 +1436,8 @@ void __packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)>::__move_to(
template <class _Fp, class _Alloc, class _Rp, class... _ArgTypes>
void __packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)>::destroy() {
- __func_.~_Fp();
__alloc_.~_Alloc();
+ __func_.~_Fp();
----------------
ldionne wrote:
As discussed, a test case here would be nice. You mentioned an allocator that lives in the padding bits of func, and then func does something bad with its padding bits upon destruction. Then when the allocator gets destroyed second, it explodes.
https://github.com/llvm/llvm-project/pull/200642
More information about the libcxx-commits
mailing list