-
Notifications
You must be signed in to change notification settings - Fork 635
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
Moving *this before calling get_immediate_executor() causes undefined behavior #2925
Labels
Comments
@Jackarain Thanks for reporting this. I can confirm that this is a bug, as the order of evaluation of function arguments is unspecified and move can happen before dereferencing |
ashtum
added a commit
to ashtum/beast
that referenced
this issue
Sep 4, 2024
感谢您的回复,以及迅速的作出修复,感谢 |
Great work, @Jackarain :) thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the following code, std::move(*this) is used before calling get_immediate_executor(). This can result in undefined behavior, as the this object may become invalid after the move operation.
beast/include/boost/beast/core/impl/basic_stream.hpp
Lines 328 to 330 in 21545db
The text was updated successfully, but these errors were encountered: