kanseiishikawa commented on issue #13496:
URL: 
https://github.com/apache/trafficserver/issues/13496#issuecomment-5700204191

   I have a question
   
   
   > The second exit only satisfies half of that, so the guard is skipped, 
server_up stays true, and build_request() is called at line 2961 — outside the 
s->current.server != nullptr check at 2931 that you spotted. 
handle_request_keep_alive_headers() then dereferences it at 6889.
   
   I think `The second exit` indicates 'if (response_returnable == true && 
is_stale_cache_response_returnable(s) == true)', but if the initial condition 
isn't met, `handle_parent_died` is called and the function returns; it seems to 
me that `build_request` wouldn't be called in that case—what do you think?
   ```
   else if (s->current.request_to == HOST_NONE && s->parent_result.result == 
PARENT_FAIL) {
         if (response_returnable == true && 
is_stale_cache_response_returnable(s) == true) {
           server_up = false;
           update_current_info(&s->current, nullptr, UNDEFINED_LOOKUP, 0);
           TxnDebug("http_trans", "CacheOpenReadHit - server_down, returning 
stale document");
         } else {
           handle_parent_died(s);
           return;
         }
       }
   ```


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