Make sure that a low QuicPacketCreator soft limit does not cause issues

This issue was causing a DCHECK failure in Envoy QUIC integration tests. In this test, Envoy would receive a QUIC packet and queue up some 1-RTT stream data which would trigger coalescing and set the soft max packet length. Then the code would try to send an initial ack. The issue there is that when switching the encryption level to initial, the header size would increase - and then when trying to add a frame we would trigger a DCHECK in BytesFree because the soft max packet length is lower than the header size. After performing code analysis, it is clear that any caller of BytesFree() properly handles the case where BytesFree() returns 0, so this DCHECK can be safely removed as it provides no value. This CL adds a regression test that would trigger the DCHECK if it were still present.

PiperOrigin-RevId: 368828653
Change-Id: I300326dd4e068569f4cec2690002cd4352d2afc2
2 files changed
tree: 292d3d3cc2f892b4b6c2b9c5b9554aa23a08e496
  1. common/
  2. epoll_server/
  3. http2/
  4. quic/
  5. spdy/
  6. CONTRIBUTING.md
  7. LICENSE
  8. README.md
README.md

QUICHE

QUICHE (QUIC, Http/2, Etc) is Google‘s implementation of QUIC and related protocols. It powers Chromium as well as Google’s QUIC servers and some other projects. QUICHE is only supported on little-endian platforms.

Code can be viewed in CodeSearch in Quiche and is imported into Chromium.