Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leaks in single_consumer_event #182

Open
erikzenker opened this issue Nov 15, 2020 · 4 comments
Open

Memory leaks in single_consumer_event #182

erikzenker opened this issue Nov 15, 2020 · 4 comments

Comments

@erikzenker
Copy link

When running the test single_consumer_async_auto_reset_event_tests with activated address sanitizer or using valgrind you will detect memory leaks:

erik@excelsior ~/p/c/build (master)> ./test/single_consumer_async_auto_reset_event_tests
[doctest] doctest version is "2.4.0"
[doctest] run with "--help" for options
===============================================================================
[doctest] test cases:      2 |      2 passed |      0 failed |      0 skipped
[doctest] assertions:      3 |      3 passed |      0 failed |
[doctest] Status: SUCCESS!

=================================================================
==99642==ERROR: LeakSanitizer: detected memory leaks

Indirect leak of 92976 byte(s) in 894 object(s) allocated from:
    #0 0x7f4f1cd82f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x557be0b0b728 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda(int)#2}::operator()(int) const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x14728)
    #2 0x557be0b0cc03 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15c03)
    #3 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #4 0x557be0b114ae in cppcoro::detail::when_all_counter::notify_awaitable_completed() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1a4ae)
    #5 0x557be0b15cab in cppcoro::detail::when_all_task_promise<int>::final_suspend()::completion_notifier::await_suspend(std::__n4861::coroutine_handle<cppcoro::detail::when_all_task_promise<int> >) const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ecab)
    #6 0x557be0b0e2d5 in cppcoro::detail::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.actor(cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>)::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x172d5)
    #7 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #8 0x557be0b1550a in void cppcoro::detail::task_promise_base::final_awaitable::await_suspend<cppcoro::detail::task_promise<int> >(std::__n4861::coroutine_handle<cppcoro::detail::task_promise<int> >) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1e50a)
    #9 0x557be0b0c175 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda(int)#2}::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda()#1}::operator()(int) const::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15175)
    #10 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #11 0x557be0b75c85 in cppcoro::static_thread_pool::run_worker_thread(unsigned int) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7ec85)
    #12 0x557be0b7560c in cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}::operator()() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7e60c)
    #13 0x557be0b7801f in void std::__invoke_impl<void, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_other, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x8101f)
    #14 0x557be0b77fd4 in std::__invoke_result<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>::type std::__invoke<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_result&&, (cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&)...) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80fd4)
    #15 0x557be0b77f81 in void std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f81)
    #16 0x557be0b77f55 in std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::operator()() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f55)
    #17 0x557be0b77f39 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> > >::_M_run() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f39)
    #18 0x7f4f1cb9fc23 in execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80

Indirect leak of 92976 byte(s) in 894 object(s) allocated from:
    #0 0x7f4f1cd82f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x557be0b0b728 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda(int)#2}::operator()(int) const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x14728)
    #2 0x557be0b0cba6 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15ba6)
    #3 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #4 0x557be0b114ae in cppcoro::detail::when_all_counter::notify_awaitable_completed() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1a4ae)
    #5 0x557be0b15cab in cppcoro::detail::when_all_task_promise<int>::final_suspend()::completion_notifier::await_suspend(std::__n4861::coroutine_handle<cppcoro::detail::when_all_task_promise<int> >) const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ecab)
    #6 0x557be0b0e2d5 in cppcoro::detail::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.actor(cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>)::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x172d5)
    #7 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #8 0x557be0b1550a in void cppcoro::detail::task_promise_base::final_awaitable::await_suspend<cppcoro::detail::task_promise<int> >(std::__n4861::coroutine_handle<cppcoro::detail::task_promise<int> >) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1e50a)
    #9 0x557be0b0c175 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda(int)#2}::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda()#1}::operator()(int) const::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15175)
    #10 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #11 0x557be0b75c85 in cppcoro::static_thread_pool::run_worker_thread(unsigned int) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7ec85)
    #12 0x557be0b7560c in cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}::operator()() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7e60c)
    #13 0x557be0b7801f in void std::__invoke_impl<void, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_other, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x8101f)
    #14 0x557be0b77fd4 in std::__invoke_result<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>::type std::__invoke<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_result&&, (cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&)...) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80fd4)
    #15 0x557be0b77f81 in void std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f81)
    #16 0x557be0b77f55 in std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::operator()() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f55)
    #17 0x557be0b77f39 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> > >::_M_run() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f39)
    #18 0x7f4f1cb9fc23 in execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80

Indirect leak of 85824 byte(s) in 894 object(s) allocated from:
    #0 0x7f4f1cd82f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x557be0b0acc7 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda()#1}::operator()() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x13cc7)
    #2 0x557be0b0cc58 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15c58)
    #3 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #4 0x557be0b114ae in cppcoro::detail::when_all_counter::notify_awaitable_completed() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1a4ae)
    #5 0x557be0b15cab in cppcoro::detail::when_all_task_promise<int>::final_suspend()::completion_notifier::await_suspend(std::__n4861::coroutine_handle<cppcoro::detail::when_all_task_promise<int> >) const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ecab)
    #6 0x557be0b0e2d5 in cppcoro::detail::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.actor(cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>)::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x172d5)
    #7 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #8 0x557be0b1550a in void cppcoro::detail::task_promise_base::final_awaitable::await_suspend<cppcoro::detail::task_promise<int> >(std::__n4861::coroutine_handle<cppcoro::detail::task_promise<int> >) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1e50a)
    #9 0x557be0b0c175 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda(int)#2}::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda()#1}::operator()(int) const::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15175)
    #10 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #11 0x557be0b75c85 in cppcoro::static_thread_pool::run_worker_thread(unsigned int) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7ec85)
    #12 0x557be0b7560c in cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}::operator()() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7e60c)
    #13 0x557be0b7801f in void std::__invoke_impl<void, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_other, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x8101f)
    #14 0x557be0b77fd4 in std::__invoke_result<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>::type std::__invoke<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_result&&, (cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&)...) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80fd4)
    #15 0x557be0b77f81 in void std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f81)
    #16 0x557be0b77f55 in std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::operator()() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f55)
    #17 0x557be0b77f39 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> > >::_M_run() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f39)
    #18 0x7f4f1cb9fc23 in execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80

Indirect leak of 78672 byte(s) in 894 object(s) allocated from:
    #0 0x7f4f1cd82f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x557be0b15e41 in cppcoro::detail::when_all_task<int> cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ee41)
    #2 0x557be0b12a5d in auto cppcoro::when_all_ready<cppcoro::task<int>, cppcoro::task<int>, cppcoro::task<int>, 0>(cppcoro::task<int>&&, cppcoro::task<int>&&, cppcoro::task<int>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ba5d)
    #3 0x557be0b132c2 in auto cppcoro::when_all<cppcoro::task<int>, cppcoro::task<int>, cppcoro::task<int>, 0>(cppcoro::task<int>&&, cppcoro::task<int>&&, cppcoro::task<int>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1c2c2)
    #4 0x557be0b0cced in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15ced)
    #5 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #6 0x557be0b114ae in cppcoro::detail::when_all_counter::notify_awaitable_completed() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1a4ae)
    #7 0x557be0b15cab in cppcoro::detail::when_all_task_promise<int>::final_suspend()::completion_notifier::await_suspend(std::__n4861::coroutine_handle<cppcoro::detail::when_all_task_promise<int> >) const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ecab)
    #8 0x557be0b0e2d5 in cppcoro::detail::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.actor(cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>)::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x172d5)
    #9 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #10 0x557be0b1550a in void cppcoro::detail::task_promise_base::final_awaitable::await_suspend<cppcoro::detail::task_promise<int> >(std::__n4861::coroutine_handle<cppcoro::detail::task_promise<int> >) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1e50a)
    #11 0x557be0b0c175 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda(int)#2}::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda()#1}::operator()(int) const::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15175)
    #12 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #13 0x557be0b75c85 in cppcoro::static_thread_pool::run_worker_thread(unsigned int) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7ec85)
    #14 0x557be0b7560c in cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}::operator()() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7e60c)
    #15 0x557be0b7801f in void std::__invoke_impl<void, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_other, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x8101f)
    #16 0x557be0b77fd4 in std::__invoke_result<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>::type std::__invoke<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_result&&, (cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&)...) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80fd4)
    #17 0x557be0b77f81 in void std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f81)
    #18 0x557be0b77f55 in std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::operator()() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f55)
    #19 0x557be0b77f39 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> > >::_M_run() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f39)
    #20 0x7f4f1cb9fc23 in execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80

Indirect leak of 78672 byte(s) in 894 object(s) allocated from:
    #0 0x7f4f1cd82f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x557be0b15e41 in cppcoro::detail::when_all_task<int> cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ee41)
    #2 0x557be0b129fc in auto cppcoro::when_all_ready<cppcoro::task<int>, cppcoro::task<int>, cppcoro::task<int>, 0>(cppcoro::task<int>&&, cppcoro::task<int>&&, cppcoro::task<int>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1b9fc)
    #3 0x557be0b132c2 in auto cppcoro::when_all<cppcoro::task<int>, cppcoro::task<int>, cppcoro::task<int>, 0>(cppcoro::task<int>&&, cppcoro::task<int>&&, cppcoro::task<int>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1c2c2)
    #4 0x557be0b0cced in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15ced)
    #5 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #6 0x557be0b114ae in cppcoro::detail::when_all_counter::notify_awaitable_completed() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1a4ae)
    #7 0x557be0b15cab in cppcoro::detail::when_all_task_promise<int>::final_suspend()::completion_notifier::await_suspend(std::__n4861::coroutine_handle<cppcoro::detail::when_all_task_promise<int> >) const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ecab)
    #8 0x557be0b0e2d5 in cppcoro::detail::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.actor(cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>)::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x172d5)
    #9 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #10 0x557be0b1550a in void cppcoro::detail::task_promise_base::final_awaitable::await_suspend<cppcoro::detail::task_promise<int> >(std::__n4861::coroutine_handle<cppcoro::detail::task_promise<int> >) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1e50a)
    #11 0x557be0b0c175 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda(int)#2}::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda()#1}::operator()(int) const::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15175)
    #12 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #13 0x557be0b75c85 in cppcoro::static_thread_pool::run_worker_thread(unsigned int) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7ec85)
    #14 0x557be0b7560c in cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}::operator()() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7e60c)
    #15 0x557be0b7801f in void std::__invoke_impl<void, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_other, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x8101f)
    #16 0x557be0b77fd4 in std::__invoke_result<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>::type std::__invoke<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_result&&, (cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&)...) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80fd4)
    #17 0x557be0b77f81 in void std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f81)
    #18 0x557be0b77f55 in std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::operator()() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f55)
    #19 0x557be0b77f39 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> > >::_M_run() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f39)
    #20 0x7f4f1cb9fc23 in execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80

Indirect leak of 78672 byte(s) in 894 object(s) allocated from:
    #0 0x7f4f1cd82f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x557be0b15e41 in cppcoro::detail::when_all_task<int> cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ee41)
    #2 0x557be0b12abe in auto cppcoro::when_all_ready<cppcoro::task<int>, cppcoro::task<int>, cppcoro::task<int>, 0>(cppcoro::task<int>&&, cppcoro::task<int>&&, cppcoro::task<int>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1babe)
    #3 0x557be0b132c2 in auto cppcoro::when_all<cppcoro::task<int>, cppcoro::task<int>, cppcoro::task<int>, 0>(cppcoro::task<int>&&, cppcoro::task<int>&&, cppcoro::task<int>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1c2c2)
    #4 0x557be0b0cced in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15ced)
    #5 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #6 0x557be0b114ae in cppcoro::detail::when_all_counter::notify_awaitable_completed() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1a4ae)
    #7 0x557be0b15cab in cppcoro::detail::when_all_task_promise<int>::final_suspend()::completion_notifier::await_suspend(std::__n4861::coroutine_handle<cppcoro::detail::when_all_task_promise<int> >) const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ecab)
    #8 0x557be0b0e2d5 in cppcoro::detail::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.actor(cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>)::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x172d5)
    #9 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #10 0x557be0b1550a in void cppcoro::detail::task_promise_base::final_awaitable::await_suspend<cppcoro::detail::task_promise<int> >(std::__n4861::coroutine_handle<cppcoro::detail::task_promise<int> >) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1e50a)
    #11 0x557be0b0c175 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda(int)#2}::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda()#1}::operator()(int) const::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15175)
    #12 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #13 0x557be0b75c85 in cppcoro::static_thread_pool::run_worker_thread(unsigned int) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7ec85)
    #14 0x557be0b7560c in cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}::operator()() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7e60c)
    #15 0x557be0b7801f in void std::__invoke_impl<void, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_other, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x8101f)
    #16 0x557be0b77fd4 in std::__invoke_result<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>::type std::__invoke<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_result&&, (cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&)...) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80fd4)
    #17 0x557be0b77f81 in void std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f81)
    #18 0x557be0b77f55 in std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::operator()() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f55)
    #19 0x557be0b77f39 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> > >::_M_run() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f39)
    #20 0x7f4f1cb9fc23 in execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80

Indirect leak of 10920 byte(s) in 105 object(s) allocated from:
    #0 0x7f4f1cd82f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x557be0b0b728 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda(int)#2}::operator()(int) const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x14728)
    #2 0x557be0b0cba6 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15ba6)
    #3 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #4 0x557be0b114ae in cppcoro::detail::when_all_counter::notify_awaitable_completed() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1a4ae)
    #5 0x557be0b15cab in cppcoro::detail::when_all_task_promise<int>::final_suspend()::completion_notifier::await_suspend(std::__n4861::coroutine_handle<cppcoro::detail::when_all_task_promise<int> >) const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ecab)
    #6 0x557be0b0e2d5 in cppcoro::detail::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.actor(cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>)::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x172d5)
    #7 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #8 0x557be0b1550a in void cppcoro::detail::task_promise_base::final_awaitable::await_suspend<cppcoro::detail::task_promise<int> >(std::__n4861::coroutine_handle<cppcoro::detail::task_promise<int> >) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1e50a)
    #9 0x557be0b0c175 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda(int)#2}::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda()#1}::operator()(int) const::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15175)
    #10 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #11 0x557be0b75e16 in cppcoro::static_thread_pool::run_worker_thread(unsigned int) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7ee16)
    #12 0x557be0b7560c in cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}::operator()() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7e60c)
    #13 0x557be0b7801f in void std::__invoke_impl<void, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_other, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x8101f)
    #14 0x557be0b77fd4 in std::__invoke_result<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>::type std::__invoke<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_result&&, (cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&)...) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80fd4)
    #15 0x557be0b77f81 in void std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f81)
    #16 0x557be0b77f55 in std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::operator()() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f55)
    #17 0x557be0b77f39 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> > >::_M_run() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f39)
    #18 0x7f4f1cb9fc23 in execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80

Indirect leak of 10920 byte(s) in 105 object(s) allocated from:
    #0 0x7f4f1cd82f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x557be0b0b728 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda(int)#2}::operator()(int) const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x14728)
    #2 0x557be0b0cc03 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15c03)
    #3 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #4 0x557be0b114ae in cppcoro::detail::when_all_counter::notify_awaitable_completed() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1a4ae)
    #5 0x557be0b15cab in cppcoro::detail::when_all_task_promise<int>::final_suspend()::completion_notifier::await_suspend(std::__n4861::coroutine_handle<cppcoro::detail::when_all_task_promise<int> >) const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ecab)
    #6 0x557be0b0e2d5 in cppcoro::detail::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.actor(cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>)::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x172d5)
    #7 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #8 0x557be0b1550a in void cppcoro::detail::task_promise_base::final_awaitable::await_suspend<cppcoro::detail::task_promise<int> >(std::__n4861::coroutine_handle<cppcoro::detail::task_promise<int> >) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1e50a)
    #9 0x557be0b0c175 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda(int)#2}::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda()#1}::operator()(int) const::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15175)
    #10 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #11 0x557be0b75e16 in cppcoro::static_thread_pool::run_worker_thread(unsigned int) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7ee16)
    #12 0x557be0b7560c in cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}::operator()() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7e60c)
    #13 0x557be0b7801f in void std::__invoke_impl<void, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_other, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x8101f)
    #14 0x557be0b77fd4 in std::__invoke_result<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>::type std::__invoke<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_result&&, (cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&)...) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80fd4)
    #15 0x557be0b77f81 in void std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f81)
    #16 0x557be0b77f55 in std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::operator()() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f55)
    #17 0x557be0b77f39 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> > >::_M_run() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f39)
    #18 0x7f4f1cb9fc23 in execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80

Indirect leak of 10080 byte(s) in 105 object(s) allocated from:
    #0 0x7f4f1cd82f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x557be0b0acc7 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda()#1}::operator()() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x13cc7)
    #2 0x557be0b0cc58 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15c58)
    #3 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #4 0x557be0b114ae in cppcoro::detail::when_all_counter::notify_awaitable_completed() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1a4ae)
    #5 0x557be0b15cab in cppcoro::detail::when_all_task_promise<int>::final_suspend()::completion_notifier::await_suspend(std::__n4861::coroutine_handle<cppcoro::detail::when_all_task_promise<int> >) const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ecab)
    #6 0x557be0b0e2d5 in cppcoro::detail::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.actor(cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>)::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x172d5)
    #7 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #8 0x557be0b1550a in void cppcoro::detail::task_promise_base::final_awaitable::await_suspend<cppcoro::detail::task_promise<int> >(std::__n4861::coroutine_handle<cppcoro::detail::task_promise<int> >) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1e50a)
    #9 0x557be0b0c175 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda(int)#2}::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda()#1}::operator()(int) const::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15175)
    #10 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #11 0x557be0b75e16 in cppcoro::static_thread_pool::run_worker_thread(unsigned int) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7ee16)
    #12 0x557be0b7560c in cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}::operator()() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7e60c)
    #13 0x557be0b7801f in void std::__invoke_impl<void, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_other, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x8101f)
    #14 0x557be0b77fd4 in std::__invoke_result<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>::type std::__invoke<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_result&&, (cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&)...) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80fd4)
    #15 0x557be0b77f81 in void std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f81)
    #16 0x557be0b77f55 in std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::operator()() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f55)
    #17 0x557be0b77f39 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> > >::_M_run() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f39)
    #18 0x7f4f1cb9fc23 in execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80

Indirect leak of 9240 byte(s) in 105 object(s) allocated from:
    #0 0x7f4f1cd82f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x557be0b15e41 in cppcoro::detail::when_all_task<int> cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ee41)
    #2 0x557be0b12a5d in auto cppcoro::when_all_ready<cppcoro::task<int>, cppcoro::task<int>, cppcoro::task<int>, 0>(cppcoro::task<int>&&, cppcoro::task<int>&&, cppcoro::task<int>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ba5d)
    #3 0x557be0b132c2 in auto cppcoro::when_all<cppcoro::task<int>, cppcoro::task<int>, cppcoro::task<int>, 0>(cppcoro::task<int>&&, cppcoro::task<int>&&, cppcoro::task<int>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1c2c2)
    #4 0x557be0b0cced in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15ced)
    #5 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #6 0x557be0b114ae in cppcoro::detail::when_all_counter::notify_awaitable_completed() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1a4ae)
    #7 0x557be0b15cab in cppcoro::detail::when_all_task_promise<int>::final_suspend()::completion_notifier::await_suspend(std::__n4861::coroutine_handle<cppcoro::detail::when_all_task_promise<int> >) const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ecab)
    #8 0x557be0b0e2d5 in cppcoro::detail::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.actor(cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>)::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x172d5)
    #9 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #10 0x557be0b1550a in void cppcoro::detail::task_promise_base::final_awaitable::await_suspend<cppcoro::detail::task_promise<int> >(std::__n4861::coroutine_handle<cppcoro::detail::task_promise<int> >) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1e50a)
    #11 0x557be0b0c175 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda(int)#2}::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda()#1}::operator()(int) const::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15175)
    #12 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #13 0x557be0b75e16 in cppcoro::static_thread_pool::run_worker_thread(unsigned int) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7ee16)
    #14 0x557be0b7560c in cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}::operator()() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7e60c)
    #15 0x557be0b7801f in void std::__invoke_impl<void, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_other, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x8101f)
    #16 0x557be0b77fd4 in std::__invoke_result<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>::type std::__invoke<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_result&&, (cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&)...) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80fd4)
    #17 0x557be0b77f81 in void std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f81)
    #18 0x557be0b77f55 in std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::operator()() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f55)
    #19 0x557be0b77f39 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> > >::_M_run() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f39)
    #20 0x7f4f1cb9fc23 in execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80

Indirect leak of 9240 byte(s) in 105 object(s) allocated from:
    #0 0x7f4f1cd82f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x557be0b15e41 in cppcoro::detail::when_all_task<int> cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ee41)
    #2 0x557be0b129fc in auto cppcoro::when_all_ready<cppcoro::task<int>, cppcoro::task<int>, cppcoro::task<int>, 0>(cppcoro::task<int>&&, cppcoro::task<int>&&, cppcoro::task<int>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1b9fc)
    #3 0x557be0b132c2 in auto cppcoro::when_all<cppcoro::task<int>, cppcoro::task<int>, cppcoro::task<int>, 0>(cppcoro::task<int>&&, cppcoro::task<int>&&, cppcoro::task<int>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1c2c2)
    #4 0x557be0b0cced in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15ced)
    #5 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #6 0x557be0b114ae in cppcoro::detail::when_all_counter::notify_awaitable_completed() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1a4ae)
    #7 0x557be0b15cab in cppcoro::detail::when_all_task_promise<int>::final_suspend()::completion_notifier::await_suspend(std::__n4861::coroutine_handle<cppcoro::detail::when_all_task_promise<int> >) const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ecab)
    #8 0x557be0b0e2d5 in cppcoro::detail::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.actor(cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>)::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x172d5)
    #9 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #10 0x557be0b1550a in void cppcoro::detail::task_promise_base::final_awaitable::await_suspend<cppcoro::detail::task_promise<int> >(std::__n4861::coroutine_handle<cppcoro::detail::task_promise<int> >) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1e50a)
    #11 0x557be0b0c175 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda(int)#2}::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda()#1}::operator()(int) const::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15175)
    #12 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #13 0x557be0b75e16 in cppcoro::static_thread_pool::run_worker_thread(unsigned int) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7ee16)
    #14 0x557be0b7560c in cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}::operator()() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7e60c)
    #15 0x557be0b7801f in void std::__invoke_impl<void, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_other, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x8101f)
    #16 0x557be0b77fd4 in std::__invoke_result<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>::type std::__invoke<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_result&&, (cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&)...) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80fd4)
    #17 0x557be0b77f81 in void std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f81)
    #18 0x557be0b77f55 in std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::operator()() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f55)
    #19 0x557be0b77f39 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> > >::_M_run() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f39)
    #20 0x7f4f1cb9fc23 in execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80

Indirect leak of 9240 byte(s) in 105 object(s) allocated from:
    #0 0x7f4f1cd82f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x557be0b15e41 in cppcoro::detail::when_all_task<int> cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ee41)
    #2 0x557be0b12abe in auto cppcoro::when_all_ready<cppcoro::task<int>, cppcoro::task<int>, cppcoro::task<int>, 0>(cppcoro::task<int>&&, cppcoro::task<int>&&, cppcoro::task<int>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1babe)
    #3 0x557be0b132c2 in auto cppcoro::when_all<cppcoro::task<int>, cppcoro::task<int>, cppcoro::task<int>, 0>(cppcoro::task<int>&&, cppcoro::task<int>&&, cppcoro::task<int>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1c2c2)
    #4 0x557be0b0cced in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15ced)
    #5 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #6 0x557be0b114ae in cppcoro::detail::when_all_counter::notify_awaitable_completed() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1a4ae)
    #7 0x557be0b15cab in cppcoro::detail::when_all_task_promise<int>::final_suspend()::completion_notifier::await_suspend(std::__n4861::coroutine_handle<cppcoro::detail::when_all_task_promise<int> >) const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ecab)
    #8 0x557be0b0e2d5 in cppcoro::detail::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.actor(cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>)::_ZN7cppcoro6detail18make_when_all_taskINS_4taskIiEEiLi0EEENS0_13when_all_taskIT0_EET_.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x172d5)
    #9 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #10 0x557be0b1550a in void cppcoro::detail::task_promise_base::final_awaitable::await_suspend<cppcoro::detail::task_promise<int> >(std::__n4861::coroutine_handle<cppcoro::detail::task_promise<int> >) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1e50a)
    #11 0x557be0b0c175 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda(int)#2}::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda()#1}::operator()(int) const::_ZZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEvENKUliE0_clEi.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15175)
    #12 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #13 0x557be0b75e16 in cppcoro::static_thread_pool::run_worker_thread(unsigned int) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7ee16)
    #14 0x557be0b7560c in cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}::operator()() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x7e60c)
    #15 0x557be0b7801f in void std::__invoke_impl<void, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_other, cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x8101f)
    #16 0x557be0b77fd4 in std::__invoke_result<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>::type std::__invoke<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}>(std::__invoke_result&&, (cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}&&)...) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80fd4)
    #17 0x557be0b77f81 in void std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f81)
    #18 0x557be0b77f55 in std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> >::operator()() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f55)
    #19 0x557be0b77f39 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<cppcoro::static_thread_pool::static_thread_pool(unsigned int)::{lambda()#1}> > >::_M_run() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x80f39)
    #20 0x7f4f1cb9fc23 in execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80

Indirect leak of 104 byte(s) in 1 object(s) allocated from:
    #0 0x7f4f1cd82f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x557be0b0b728 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda(int)#2}::operator()(int) const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x14728)
    #2 0x557be0b0cc03 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15c03)
    #3 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #4 0x557be0b169f2 in cppcoro::task<void>::awaitable_base::await_suspend(std::__n4861::coroutine_handle<void>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1f9f2)
    #5 0x557be0b0f20d in cppcoro::detail::_ZN7cppcoro6detail19make_sync_wait_taskINS_4taskIvEEvLi0EEENS0_14sync_wait_taskIvEEOT_.actor(cppcoro::detail::make_sync_wait_task<cppcoro::task<void>, void, 0>(cppcoro::task<void>&&)::_ZN7cppcoro6detail19make_sync_wait_taskINS_4taskIvEEvLi0EEENS0_14sync_wait_taskIvEEOT_.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1820d)
    #6 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #7 0x557be0b10e27 in cppcoro::detail::sync_wait_task_promise<void>::start(cppcoro::detail::lightweight_manual_reset_event&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x19e27)
    #8 0x557be0b18925 in cppcoro::detail::sync_wait_task<void>::start(cppcoro::detail::lightweight_manual_reset_event&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x21925)
    #9 0x557be0b1678f in cppcoro::awaitable_traits<cppcoro::task<void>&&, void>::await_result_t cppcoro::sync_wait<cppcoro::task<void> >(cppcoro::task<void>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1f78f)
    #10 0x557be0b0d4cf in _DOCTEST_ANON_FUNC_6() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x164cf)
    #11 0x557be0b46776 in doctest::Context::run() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x4f776)
    #12 0x557be0b4850a in main (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x5150a)
    #13 0x7f4f1c7cf151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)

Indirect leak of 104 byte(s) in 1 object(s) allocated from:
    #0 0x7f4f1cd82f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x557be0b0b728 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda(int)#2}::operator()(int) const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x14728)
    #2 0x557be0b0cba6 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15ba6)
    #3 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #4 0x557be0b169f2 in cppcoro::task<void>::awaitable_base::await_suspend(std::__n4861::coroutine_handle<void>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1f9f2)
    #5 0x557be0b0f20d in cppcoro::detail::_ZN7cppcoro6detail19make_sync_wait_taskINS_4taskIvEEvLi0EEENS0_14sync_wait_taskIvEEOT_.actor(cppcoro::detail::make_sync_wait_task<cppcoro::task<void>, void, 0>(cppcoro::task<void>&&)::_ZN7cppcoro6detail19make_sync_wait_taskINS_4taskIvEEvLi0EEENS0_14sync_wait_taskIvEEOT_.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1820d)
    #6 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #7 0x557be0b10e27 in cppcoro::detail::sync_wait_task_promise<void>::start(cppcoro::detail::lightweight_manual_reset_event&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x19e27)
    #8 0x557be0b18925 in cppcoro::detail::sync_wait_task<void>::start(cppcoro::detail::lightweight_manual_reset_event&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x21925)
    #9 0x557be0b1678f in cppcoro::awaitable_traits<cppcoro::task<void>&&, void>::await_result_t cppcoro::sync_wait<cppcoro::task<void> >(cppcoro::task<void>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1f78f)
    #10 0x557be0b0d4cf in _DOCTEST_ANON_FUNC_6() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x164cf)
    #11 0x557be0b46776 in doctest::Context::run() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x4f776)
    #12 0x557be0b4850a in main (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x5150a)
    #13 0x7f4f1c7cf151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)

Indirect leak of 96 byte(s) in 1 object(s) allocated from:
    #0 0x7f4f1cd82f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x557be0b0acc7 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::{lambda()#1}::operator()() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x13cc7)
    #2 0x557be0b0cc58 in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15c58)
    #3 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #4 0x557be0b169f2 in cppcoro::task<void>::awaitable_base::await_suspend(std::__n4861::coroutine_handle<void>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1f9f2)
    #5 0x557be0b0f20d in cppcoro::detail::_ZN7cppcoro6detail19make_sync_wait_taskINS_4taskIvEEvLi0EEENS0_14sync_wait_taskIvEEOT_.actor(cppcoro::detail::make_sync_wait_task<cppcoro::task<void>, void, 0>(cppcoro::task<void>&&)::_ZN7cppcoro6detail19make_sync_wait_taskINS_4taskIvEEvLi0EEENS0_14sync_wait_taskIvEEOT_.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1820d)
    #6 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #7 0x557be0b10e27 in cppcoro::detail::sync_wait_task_promise<void>::start(cppcoro::detail::lightweight_manual_reset_event&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x19e27)
    #8 0x557be0b18925 in cppcoro::detail::sync_wait_task<void>::start(cppcoro::detail::lightweight_manual_reset_event&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x21925)
    #9 0x557be0b1678f in cppcoro::awaitable_traits<cppcoro::task<void>&&, void>::await_result_t cppcoro::sync_wait<cppcoro::task<void> >(cppcoro::task<void>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1f78f)
    #10 0x557be0b0d4cf in _DOCTEST_ANON_FUNC_6() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x164cf)
    #11 0x557be0b46776 in doctest::Context::run() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x4f776)
    #12 0x557be0b4850a in main (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x5150a)
    #13 0x7f4f1c7cf151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)

Indirect leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0x7f4f1cd82f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x557be0b15e41 in cppcoro::detail::when_all_task<int> cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ee41)
    #2 0x557be0b12a5d in auto cppcoro::when_all_ready<cppcoro::task<int>, cppcoro::task<int>, cppcoro::task<int>, 0>(cppcoro::task<int>&&, cppcoro::task<int>&&, cppcoro::task<int>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ba5d)
    #3 0x557be0b132c2 in auto cppcoro::when_all<cppcoro::task<int>, cppcoro::task<int>, cppcoro::task<int>, 0>(cppcoro::task<int>&&, cppcoro::task<int>&&, cppcoro::task<int>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1c2c2)
    #4 0x557be0b0cced in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15ced)
    #5 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #6 0x557be0b169f2 in cppcoro::task<void>::awaitable_base::await_suspend(std::__n4861::coroutine_handle<void>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1f9f2)
    #7 0x557be0b0f20d in cppcoro::detail::_ZN7cppcoro6detail19make_sync_wait_taskINS_4taskIvEEvLi0EEENS0_14sync_wait_taskIvEEOT_.actor(cppcoro::detail::make_sync_wait_task<cppcoro::task<void>, void, 0>(cppcoro::task<void>&&)::_ZN7cppcoro6detail19make_sync_wait_taskINS_4taskIvEEvLi0EEENS0_14sync_wait_taskIvEEOT_.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1820d)
    #8 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #9 0x557be0b10e27 in cppcoro::detail::sync_wait_task_promise<void>::start(cppcoro::detail::lightweight_manual_reset_event&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x19e27)
    #10 0x557be0b18925 in cppcoro::detail::sync_wait_task<void>::start(cppcoro::detail::lightweight_manual_reset_event&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x21925)
    #11 0x557be0b1678f in cppcoro::awaitable_traits<cppcoro::task<void>&&, void>::await_result_t cppcoro::sync_wait<cppcoro::task<void> >(cppcoro::task<void>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1f78f)
    #12 0x557be0b0d4cf in _DOCTEST_ANON_FUNC_6() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x164cf)
    #13 0x557be0b46776 in doctest::Context::run() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x4f776)
    #14 0x557be0b4850a in main (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x5150a)
    #15 0x7f4f1c7cf151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)

Indirect leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0x7f4f1cd82f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x557be0b15e41 in cppcoro::detail::when_all_task<int> cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ee41)
    #2 0x557be0b12abe in auto cppcoro::when_all_ready<cppcoro::task<int>, cppcoro::task<int>, cppcoro::task<int>, 0>(cppcoro::task<int>&&, cppcoro::task<int>&&, cppcoro::task<int>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1babe)
    #3 0x557be0b132c2 in auto cppcoro::when_all<cppcoro::task<int>, cppcoro::task<int>, cppcoro::task<int>, 0>(cppcoro::task<int>&&, cppcoro::task<int>&&, cppcoro::task<int>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1c2c2)
    #4 0x557be0b0cced in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15ced)
    #5 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #6 0x557be0b169f2 in cppcoro::task<void>::awaitable_base::await_suspend(std::__n4861::coroutine_handle<void>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1f9f2)
    #7 0x557be0b0f20d in cppcoro::detail::_ZN7cppcoro6detail19make_sync_wait_taskINS_4taskIvEEvLi0EEENS0_14sync_wait_taskIvEEOT_.actor(cppcoro::detail::make_sync_wait_task<cppcoro::task<void>, void, 0>(cppcoro::task<void>&&)::_ZN7cppcoro6detail19make_sync_wait_taskINS_4taskIvEEvLi0EEENS0_14sync_wait_taskIvEEOT_.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1820d)
    #8 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #9 0x557be0b10e27 in cppcoro::detail::sync_wait_task_promise<void>::start(cppcoro::detail::lightweight_manual_reset_event&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x19e27)
    #10 0x557be0b18925 in cppcoro::detail::sync_wait_task<void>::start(cppcoro::detail::lightweight_manual_reset_event&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x21925)
    #11 0x557be0b1678f in cppcoro::awaitable_traits<cppcoro::task<void>&&, void>::await_result_t cppcoro::sync_wait<cppcoro::task<void> >(cppcoro::task<void>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1f78f)
    #12 0x557be0b0d4cf in _DOCTEST_ANON_FUNC_6() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x164cf)
    #13 0x557be0b46776 in doctest::Context::run() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x4f776)
    #14 0x557be0b4850a in main (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x5150a)
    #15 0x7f4f1c7cf151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)

Indirect leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0x7f4f1cd82f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x557be0b15e41 in cppcoro::detail::when_all_task<int> cppcoro::detail::make_when_all_task<cppcoro::task<int>, int, 0>(cppcoro::task<int>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1ee41)
    #2 0x557be0b129fc in auto cppcoro::when_all_ready<cppcoro::task<int>, cppcoro::task<int>, cppcoro::task<int>, 0>(cppcoro::task<int>&&, cppcoro::task<int>&&, cppcoro::task<int>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1b9fc)
    #3 0x557be0b132c2 in auto cppcoro::when_all<cppcoro::task<int>, cppcoro::task<int>, cppcoro::task<int>, 0>(cppcoro::task<int>&&, cppcoro::task<int>&&, cppcoro::task<int>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1c2c2)
    #4 0x557be0b0cced in _DOCTEST_ANON_FUNC_6()::{lambda()#1}::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.actor(_DOCTEST_ANON_FUNC_6()::{lambda()#1}::operator()() const::_ZZL20_DOCTEST_ANON_FUNC_6vENKUlvE_clEv.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x15ced)
    #5 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #6 0x557be0b169f2 in cppcoro::task<void>::awaitable_base::await_suspend(std::__n4861::coroutine_handle<void>) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1f9f2)
    #7 0x557be0b0f20d in cppcoro::detail::_ZN7cppcoro6detail19make_sync_wait_taskINS_4taskIvEEvLi0EEENS0_14sync_wait_taskIvEEOT_.actor(cppcoro::detail::make_sync_wait_task<cppcoro::task<void>, void, 0>(cppcoro::task<void>&&)::_ZN7cppcoro6detail19make_sync_wait_taskINS_4taskIvEEvLi0EEENS0_14sync_wait_taskIvEEOT_.frame*) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1820d)
    #8 0x557be0b0febb in std::__n4861::coroutine_handle<void>::resume() const (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x18ebb)
    #9 0x557be0b10e27 in cppcoro::detail::sync_wait_task_promise<void>::start(cppcoro::detail::lightweight_manual_reset_event&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x19e27)
    #10 0x557be0b18925 in cppcoro::detail::sync_wait_task<void>::start(cppcoro::detail::lightweight_manual_reset_event&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x21925)
    #11 0x557be0b1678f in cppcoro::awaitable_traits<cppcoro::task<void>&&, void>::await_result_t cppcoro::sync_wait<cppcoro::task<void> >(cppcoro::task<void>&&) (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x1f78f)
    #12 0x557be0b0d4cf in _DOCTEST_ANON_FUNC_6() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x164cf)
    #13 0x557be0b46776 in doctest::Context::run() (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x4f776)
    #14 0x557be0b4850a in main (/home/erik/projects/cppcoro/build/test/single_consumer_async_auto_reset_event_tests+0x5150a)
    #15 0x7f4f1c7cf151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)

SUMMARY: AddressSanitizer: 568000 byte(s) leaked in 6000 allocation(s).

@lewissbaker
Copy link
Owner

Which version of gcc are you using?
There have been some gcc bugs that have caused weird broken coroutines behaviour that might be causing this.

Does the same issue occur on clang?

@erikzenker
Copy link
Author

gcc (GCC) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@erikzenker
Copy link
Author

Currently, I only have access to clang 11.0 which fails to configure the cmake version of cppcoro

CMake Error at cmake/FindCoroutines.cmake:272 (message):
  Cannot compile simple program using std::coroutines.  Is C++17 or later
  activated?
Call Stack (most recent call first):
  lib/CMakeLists.txt:172 (find_package)

@andreasbuhr
Copy link
Contributor

Hi, thanks for your report. Could you please try the master branch of my fork at https://github.com/andreasbuhr/cppcoro ? Some problems, specially regarding CMake, have been fixed there and the corresponding pull requests are not merged yet. To configure cppcoro, could you try the guidance I have given here: andreasbuhr#21 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants