asio
asio copied to clipboard
Asio C++ Library
Hi, It looks like there is a new warning since gcc 12 when compiling boost::asio with `-fsanitize=thread`. boost::asio uses `std::atomic_thread_fence`, but apparently ThreadSanitizer does not support this (https://github.com/google/sanitizers/issues/1352, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97868). [Example...
https://github.com/chriskohlhoff/asio/blob/54e3a844eb5f31d25416de9e509d9c24fa203c32/asio/include/asio/impl/awaitable.hpp#L507 The resume has no guarantee that the resume_context_ is not nullptr - accessing this without checking for nullptr first. With the awaitable this might not be a viable option...
@chriskohlhoff @klemens-morgenstern This should fix the sprintf issue on MacOS for good, in particular if XCode is not used but e.g. clang from brew (see https://github.com/chriskohlhoff/asio/issues/1148 for discussion). The issue...
Using `Xcode 14.0.1` with `Apple clang version 14.0.0 (clang-1400.0.29.102)` I get this deprecation warning: `asio/ip/impl/network_v6.ipp:104:3: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security...
Should remote_endpoint() throw exception after receive of RST packet from already connected client ?
Should remote_endpoint() throw exception after receive of RST packet from already connected client ? I have tls handshake which looks like this: void ClientSocket::asyncSSLHandshake() { auto shareThis = this->shared_from_this(); auto...
```cpp awaitable listener() { auto executor = co_await this_coro::executor; tcp::acceptor acceptor(executor, {tcp::v4(), 55555}); asio::thread_pool pool(4); for (;;) { tcp::socket socket = co_await acceptor.async_accept(use_awaitable); co_spawn(pool, func(std::move(socket)), detached); } } int main()...
Godbolt: https://godbolt.org/z/TYzavK8sh Only happens with separate compilation mode.
Environment: Version: asio-1-30-2 Compiler: clang-17 with clang tidy - and compiling with everything on. This has identified a NullDereference issue when using the asio::ssl::stream::async_handshake ```cpp using Socket = asio::ip::tcp::socket; asio::awaitable...