You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Lou Langholtz <ld...@eden.chpc.utah.edu> on 1998/05/26 00:53:21 UTC

Re: Setting ScriptAlias confounds lock_fname resulting in server that wont start

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