httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Havard" <bri...@kheldar.apana.org.au>
Subject Re: cvs commit: httpd-2.0/server protocol.c
Date Sat, 21 Apr 2001 04:18:36 GMT
On Fri, 20 Apr 2001 16:47:15 -0400, Bill Stoddard wrote:

>This patch avoids the segfault. Basically, the core_module hook needs to run first. Any
problems
>with this?

I'm also seeing exactly the same segfault which your patch fixes. I've no
idea if it's the "right" fix though.



>Index: core.c
>===================================================================
>RCS file: /home/cvs/httpd-2.0/server/core.c,v
>retrieving revision 1.8
>diff -u -u -r1.8 core.c
>--- core.c 2001/04/11 23:37:16 1.8
>+++ core.c 2001/04/20 20:35:44
>@@ -3274,7 +3274,7 @@
>     /* FIXME: I suspect we can eliminate the need for these - Ben */
>     ap_hook_type_checker(do_nothing,NULL,NULL,APR_HOOK_REALLY_LAST);
>     ap_hook_access_checker(do_nothing,NULL,NULL,APR_HOOK_REALLY_LAST);
>-    ap_hook_create_request(core_create_req, NULL, NULL, APR_HOOK_MIDDLE);
>+    ap_hook_create_request(core_create_req, NULL, NULL, APR_HOOK_FIRST);
>
>     /* register the core's insert_filter hook and register core-provided
>      * filters
>
>
>> I am fairly sure this patch is at least a contributing factor to a seg fault I am
trying to debug.
>> The seg fault, which happens on the first request to the server,  is in ap_getline().
req_cfg is
>> NULL after the call to ap_get_module_config().  We blow up trying to reference req_cgg->bb.
with a
>> NULL pointer. Here is the code snip...
>>
>>     req_cfg = (core_request_config *)
>>                 ap_get_module_config(r->request_config, &core_module);
>>     b = req_cfg->bb
>>
>> The problem is that ap_set_module_config() has not been called on core_module yet.
 Ryan, did this
>> code serve pages for you before you committed it?
>>
>> Bill
>>
>>
>>
>> > rbb         01/04/17 20:53:35
>> >
>> >   Modified:    include  httpd.h
>> >                modules/http config.m4 http_core.c http_protocol.c
>> >                         mod_core.h
>> >                modules/loggers mod_log_config.c
>> >                server   protocol.c
>> >   Log:
>> >   Move the keepalives field out of the conn_rec and into an HTTP specific
>> >   connection record.  This also moves some HTTP specific back out of the
>> >   core and into the HTTP module.
>> >
>> >   Revision  Changes    Path
>> >   1.147     +0 -4      httpd-2.0/include/httpd.h
>> >
>>
>>
>

-- 
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------


Mime
View raw message