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

   The branch OS builds compile GCC 12, 14 and 15 **release** builds with 
`-Werror`. PR CI doesn't build that combination (its GCC builds are Debug, and 
fedora/ubuntu use clang), so three optimization-only warnings reached master 
and broke these builds on [master/branch_build 
#1404](https://ci.trafficserver.apache.org/job/master/job/branch_build/1404/) 
(built at c8935543e2):
   
   | Warning | Compiler / OS | Where | Fix |
   |---|---|---|---|
   | `protocol_mask` is used uninitialized (`-Wuninitialized`) | GCC 15, fedora 
42 | `YamlSNIConfig::Item`, reached from `test_SSLSNIConfig.cc` | default 
`protocol_mask` to 0 |
   | `-Wfree-nonheap-object` (false positive) | GCC 14, fedora 40 and 41 | 
`std::stable_sort` in `parse_plugin_yaml()` | `std::sort` with the existing 
`seq_idx` as the tie-breaker, which gives the same order |
   | `-Wrestrict` (known GCC 12 false positive) | GCC 12, debian 12 | 
`yaml_path()` in the abuse_shield config test | build the quoted string by 
appending |
   
   `protocol_mask` is only read when `protocol_unset` is false, and it is 
always assigned before then, so defaulting it to 0 removes the indeterminate 
value without changing behavior.
   
   ## Testing
   
   - The uninitialized-member warning reproduces with GCC 16 at `-O2 -Wall 
-Werror` on a minimal copy of the struct, and is gone with the default.
   - The new comparator gives the same order as the old `stable_sort` on 
200,000 random inputs. The existing `test_PluginYAML.cc` cases cover load_order 
sorting, ordered before unordered, and ties keeping file order.
   - I haven't reproduced the GCC 12 and 14 false positives locally. Each OS 
build stopped at its first failing file, so the next branch build may show more.
   


-- 
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