Copilot commented on code in PR #12976:
URL: https://github.com/apache/trafficserver/pull/12976#discussion_r2943829319
##########
plugins/experimental/http_stats/http_stats.cc:
##########
@@ -89,7 +89,7 @@ struct HTTPStatsConfig {
bool integer_counters = false;
bool wrap_counters = false;
- TSCont cont;
+ TSCont cont{nullptr};
Review Comment:
`HTTPStatsConfig::cont` is now explicitly initialized to `nullptr`, but
`~HTTPStatsConfig()` unconditionally calls `TSContDestroy(cont)`.
`TSContDestroy()` asserts that the continuation pointer is valid (it does not
accept `nullptr`), so destroying a config instance before `cont` is created
would now reliably trip an assert. Consider guarding the destroy call (or
otherwise ensuring `cont` is always created before destruction).
##########
include/proxy/FetchSM.h:
##########
@@ -165,7 +165,7 @@ class FetchSM : public Continuation
HTTPParser http_parser;
HTTPHdr client_response_hdr;
ChunkedHandler chunked_handler;
- TSFetchEvent callback_events;
+ TSFetchEvent callback_events{}; // TODO: ATS 11 - add default member
initializers to TSFetchEvent in apidefs.h (C API)
Review Comment:
The inline TODO comment references a specific future release (“ATS 11”),
which is likely to become stale and is inconsistent with other TODOs in this
codebase that usually reference an issue ID (e.g. “TS-2213”, “TS-1156”).
Consider removing the release-specific reference or replacing it with a
tracking issue ID / more timeless note.
--
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]