httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject Re: mod_include problems (was Re: Showstopper!)
Date Tue, 07 Aug 2001 02:27:37 GMT
On Mon, 6 Aug 2001, Cliff Woolley wrote:


> It's not just that... include1.shtml causes a segfault, which I'm still
> investigating.

With optimizations turned off, my backtrace looks more like this:

#0  0x080abf73 in ap_get_module_config (cv=0x0, m=0x8121d60)
    at util_debug.c:101
#1  0x080b089c in ap_allow_options (r=0x8196044) at core.c:500
#2  0x080b71b6 in ap_sub_req_lookup_file (new_file=0xbfffaeb0
"inc-two.shtml",
    r=0x8194034, next_filter=0x8194f9c) at request.c:1517
#3  0x08062828 in handle_include (ctx=0x81c618c, bb=0xbfffd384,
r=0x8194034,
    f=0x8194f84, head_ptr=0x81cb1d8, inserted_head=0xbfffd318)
    at mod_include.c:784
...

ap_sub_req_lookup_file() is calling ap_allow_options() before
rnew->per_dir_config is set; ap_allow_options() is therefore calling
ap_get_module_config with a null cv pointer.  Here's the relevant snippet
from ap_sub_req_lookup_file in request.c at line 1513, which appears to
have been broken by revision 1.17 about five days ago:


    if (ap_allow_options(rnew) & OPT_SYM_LINKS) {
        if (((rv = apr_stat(&rnew->finfo, rnew->filename,
                             APR_FINFO_MIN, rnew->pool)) != APR_SUCCESS)
                                                  && (rv != APR_INCOMPLETE))
            rnew->finfo.filetype = 0;
    }
    else
        if (((rv = apr_lstat(&rnew->finfo, rnew->filename,
                             APR_FINFO_MIN, rnew->pool)) != APR_SUCCESS)
                                                  && (rv != APR_INCOMPLETE))
            rnew->finfo.filetype = 0;

    if ((res = check_safe_file(rnew))) {
        rnew->status = res;
        return rnew;
    }

    rnew->per_dir_config = r->per_dir_config;


Is it as easy as moving that last line up above the call to
ap_allow_options()?

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Mime
View raw message