bryancall opened a new pull request, #14075:
URL: https://github.com/apache/trafficserver/pull/14075

   The gcc release builds on Debian 12 (GCC 12) and Rocky Linux 8 
(gcc-toolset-11, GCC 11) fail to compile test_TLSSNISupport.cc with -O3 
-Werror. GCC 12 reports -Warray-bounds and GCC 11 reports -Wstringop-overread 
on the copy inside std::vector::insert() in make_handshake_message(), and GCC 
12 reports the same in make_client_hello_body(). Both helpers start a vector at 
a known two or four bytes and then grow it with insert(), and GCC appears to 
misjudge the reallocation copy as running past the end. The code is correct, so 
these are false positives; GCC 11.4, 13 and 15 build the same file cleanly.
   
   This reserves each vector at its exact final size before writing to it, and 
the warnings go away. The helpers produce the same bytes as before and the 
TLSSNISupport test cases are unchanged.
   
   The test was added in #13809.
   
   Tested in the ci debian:12 and rockylinux:8 images with the os_build gcc 
release configuration: the test_net target fails on master and builds cleanly 
with this change, and test_net passes. Also built and run with clang 14.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to