You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2019/04/20 07:01:29 UTC

svn commit: r1857857 - /httpd/httpd/trunk/modules/http/http_core.c

Author: jailletc36
Date: Sat Apr 20 07:01:29 2019
New Revision: 1857857

URL: http://svn.apache.org/viewvc?rev=1857857&view=rev
Log:
Axe a useless comment.

Remove some dead code and innacurate comment. 'r' can not be dereferenced later in the function. (this is obvious since r1814659)

Modified:
    httpd/httpd/trunk/modules/http/http_core.c

Modified: httpd/httpd/trunk/modules/http/http_core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_core.c?rev=1857857&r1=1857856&r2=1857857&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/http_core.c (original)
+++ httpd/httpd/trunk/modules/http/http_core.c Sat Apr 20 07:01:29 2019
@@ -57,7 +57,6 @@ static const char *set_keep_alive_timeou
         return err;
     }
 
-    /* Stolen from mod_proxy.c */
     if (ap_timeout_parameter_parse(arg, &timeout, "s") != APR_SUCCESS)
         return "KeepAliveTimeout has wrong format";
     cmd->server->keep_alive_timeout = timeout;
@@ -156,14 +155,6 @@ static int ap_process_http_async_connect
                 }
                 ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, r);
                 ap_process_async_request(r);
-                /* After the call to ap_process_request, the
-                 * request pool may have been deleted.  We set
-                 * r=NULL here to ensure that any dereference
-                 * of r that might be added later in this function
-                 * will result in a segfault immediately instead
-                 * of nondeterministic failures later.
-                 */
-                r = NULL;
             }
 
             if (cs->state != CONN_STATE_WRITE_COMPLETION &&



Re: svn commit: r1857857 - /httpd/httpd/trunk/modules/http/http_core.c

Posted by Christophe JAILLET <ch...@wanadoo.fr>.
Le 22/04/2019 à 12:02, Yann Ylavic a écrit :
> Hi Christophe,
>
> On Sat, Apr 20, 2019 at 9:01 AM <ja...@apache.org> wrote:
>>                   ap_process_async_request(r);
>> -                /* After the call to ap_process_request, the
>> -                 * request pool may have been deleted.  We set
>> -                 * r=NULL here to ensure that any dereference
>> -                 * of r that might be added later in this function
>> -                 * will result in a segfault immediately instead
>> -                 * of nondeterministic failures later.
>> -                 */
>> -                r = NULL;
> r = NULL is indeed useless, but the comment not that much IMO.
> Adding something like ap_log_rerror() here later would be bad (we've
> been bitten by EOR several times already), so I'd prefer a comment
> still to not touch *r from here, for future proof...
>
>
> Regards,
> Yann.
>
Reverted.

The comment is about 'ap_process_request()'. Should it be updated to 
'ap_process_async_request()' ?


CJ


Re: svn commit: r1857857 - /httpd/httpd/trunk/modules/http/http_core.c

Posted by Yann Ylavic <yl...@gmail.com>.
Hi Christophe,

On Sat, Apr 20, 2019 at 9:01 AM <ja...@apache.org> wrote:
>
>                  ap_process_async_request(r);
> -                /* After the call to ap_process_request, the
> -                 * request pool may have been deleted.  We set
> -                 * r=NULL here to ensure that any dereference
> -                 * of r that might be added later in this function
> -                 * will result in a segfault immediately instead
> -                 * of nondeterministic failures later.
> -                 */
> -                r = NULL;

r = NULL is indeed useless, but the comment not that much IMO.
Adding something like ap_log_rerror() here later would be bad (we've
been bitten by EOR several times already), so I'd prefer a comment
still to not touch *r from here, for future proof...


Regards,
Yann.