ywkaras commented on a change in pull request #7100:
URL: https://github.com/apache/trafficserver/pull/7100#discussion_r468681650
##########
File path: proxy/http/HttpTransactCache.cc
##########
@@ -1309,7 +1309,7 @@
HttpTransactCache::match_response_to_request_conditionals(HTTPHdr *request, HTTP
// If-Match: must match strongly //
if (request->presence(MIME_PRESENCE_IF_MATCH)) {
- int raw_etags_len, comma_sep_tag_list_len;
+ int raw_etags_len, comma_sep_tag_list_len = 0;
Review comment:
I think this is a different case, since the value is presumably set by
value_get() in the next line.
Some advocate the practice of always initializing stack variables, to
increase the repeatability of code behavior when debugging. We could consider
defining and using a TS utility macro like:
```
#ifdef DEBUG
#define TS_DEFDZ(TYPE, NAME) TYPE NAME = 0
#else
#define TS_DEFDZ(TYPE, NAME) TYPE NAME
#endif
```
I wonder if gcc/clang has a compile option that will cause code to be
generated to zero out stack allocations, that we could apply when configure
--enable-debug was used.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]