-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
Description
Usage of the LinkedObject::moveIntoList() and LinkedObject::moveIntoListBack() is unsafe. Clang-tidy rightfully complains:
source/common/http/http2/codec_impl.cc:1317:3: error: 'stream' used after it was moved [bugprone-use-after-move,-warnings-as-errors]
stream->moveIntoList(std::move(stream), active_streams_);
^
source/common/http/http2/codec_impl.cc:1317:24: note: move occurred here
stream->moveIntoList(std::move(stream), active_streams_);
^
source/common/http/http2/codec_impl.cc:1317:3: note: the use and move are unsequenced, i.e. there is no guarantee about the order in which they are evaluated
stream->moveIntoList(std::move(stream), active_streams_);
^
This pattern is used throughout the code. So far compiler generated working code, but it should be cleaned up before we hit this issue in production.
Reactions are currently unavailable