Skip to content

Commit

Permalink
http2: removes an unnecessary ASSERT (envoyproxy#32302)
Browse files Browse the repository at this point in the history
This ASSERT triggers with a specific codec_impl_fuzz_test.cc input, but the condition itself appears arbitrary. For the purpose of code correctness, it doesn't matter whether the error code passed in is NO_ERROR or something else.

All unit and integration tests continue to pass without the ASSERT in place.

$ bazel test --config=remote test/integration/... test/common/http/...
Starting local Bazel server and connecting to it...
INFO: Invocation ID: a59c05fc-a314-4957-8e1c-188bfbec3704
INFO: Analyzed 507 targets (714 packages loaded, 37077 targets configured).
INFO: Found 361 targets and 146 test targets...
INFO: Elapsed time: 920.573s, Critical Path: 849.49s
INFO: 4318 processes: 2722 remote cache hit, 158 internal, 1438 remote.
INFO: Build completed successfully, 4318 total actions

Executed 146 out of 146 tests: 146 tests pass.
Commit Message: removes an unnecessary ASSERT
Additional Description:
Risk Level: low
Testing: ran all unit and integration tests locally
Docs Changes:
Release Notes:
Platform Specific Features:

Signed-off-by: Biren Roy <[email protected]>
  • Loading branch information
birenroy authored Feb 9, 2024
1 parent 242259f commit 6967e17
Show file tree
Hide file tree
Showing 2 changed files with 206 additions and 1 deletion.
1 change: 0 additions & 1 deletion source/common/http/http2/codec_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1488,7 +1488,6 @@ Status ConnectionImpl::onStreamClose(StreamImpl* stream, uint32_t error_code) {

} else if (stream->defer_processing_backedup_streams_ && !stream->reset_reason_.has_value() &&
stream->stream_manager_.hasBufferedBodyOrTrailers()) {
ASSERT(error_code == NGHTTP2_NO_ERROR);
ENVOY_CONN_LOG(debug, "buffered onStreamClose for stream: {}", connection_, stream_id);
// Buffer the call, rely on the stream->process_buffered_data_callback_
// to end up invoking.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6967e17

Please sign in to comment.