asio icon indicating copy to clipboard operation
asio copied to clipboard

Clang tidy clang-analyzer-core.NullDereference in awaitable object.

Open phelter opened this issue 7 months ago • 0 comments

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 since the ordering of when resume and after_suspend occur will play a role in when this occurs and the clang-tidy might not be able to rationalize that with coroutines.

phelter avatar Jul 19 '24 01:07 phelter