Fix memory safety issues in e2e test

This test contained multiple memory safety issues that would trigger if something failed. For example, if the handshake fails, there might not be a server connection and session created, and our code would previously use uninitialized memory as its session. Similarly, we would dereference header values even if we failed to find the right header, leading to use of uninitialized memory.

To fix these issues, this CL refactors some code to convenience methods that perform proper checks, and make sure the test is marked as failed if any of the convenience methods return early due to a missing object.

Note that we need to pause the server thread in order to safely access server variables, and we need to then resume the server thread even if there were failures, therefore tests cannot use ASSERTs when the server thread is paused.

gf-relnote: n/a, test-only change
PiperOrigin-RevId: 319255234
Change-Id: Ic1281bb2dd1217e1303fca1f20cb4275a343cc1c
1 file changed
tree: 9b192f53a8c1a40bd6d416aaa5fb1fc9984e2334
  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.