Open erinacio opened 10 months ago
Example:
// Clang 16, C++20, -fsanitize=address #include <asio.hpp> asio::awaitable<void> async_foo() { co_return; } asio::awaitable<void> async_main() { asio::awaitable<void> a{async_foo()}; // allocates here a = async_foo(); // leaks here co_await std::move(a); } int main() { asio::io_context io{1}; asio::co_spawn(io, async_main(), asio::detached); io.run(); return 0; }
I didn't found any official document indicating such behavior, so I believe that is unintentional and needs a fix.
Example:
I didn't found any official document indicating such behavior, so I believe that is unintentional and needs a fix.