httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lou Langholtz <>
Subject Re: Setting ScriptAlias confounds lock_fname resulting in server that wont start
Date Mon, 25 May 1998 22:53:21 GMT
I have some more info regarding my bug report that I submitted through
the bugreports web page...

I've narrowed the problem down to calling ap_psprintf(),
in expand_lock_fname(), with the particular format "%s.%lu".
When ScriptAlias is uncommented the buffer that ap_psprintf()
returns starts with the null character. When ScriptAlias is commented
out the buffer contains the expected result. I even modified the
code to see what would happen if called as:

    ap_lock_fname = ap_psprintf(p, "%s.", s);
    ap_lock_fname = ap_psprintf(p, "%s%lu", ap_lock_fname,
		(unsigned long)getpid());

When sequenced thusly the code succeeds also when ScriptAlias isn't
commented out. Of course this would be a memory leak but atleast the
code then works.

Why ScriptAlias effects all this I can only imagine having to do with
some unanticipated/improper usage of the memory pool p.
Its as though something wasn't being properly realloc'd or free'd.
Perhaps someone who's followed the development of the memory manager
or the ap_vformatter() code could chime in here ;-)

View raw message