httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <stodd...@raleigh.ibm.com>
Subject Declaring a pre_config hook in a DSO will cause Apache to seg fault
Date Wed, 09 Feb 2000 15:27:21 GMT
on the second call to ap_run_pre_config(). DSO's are unloaded by an earlier
call to ap_clear_pool(pconf) and the pre_config hook pointer (saved in the
global pool) is no longer valid.

Solution 1:
    Declare that pre-config hooks are not to be used in DSOs

Solution 2:
    Eliminate pre-config hooks entirely

Solution 3:
    Move the pre-config hook call to right after the DSO is loaded and hooks
registered.

Solution 4 (two parts):
    - Register the DSO cleanup/unload with the global pool and not pconf
(see mod_so.c)
    - Anchor the list of loaded modules in the global pool, not pconf (see
"loaded_modules" in mod_so.c)

I don't like option 1. I like 2 for it's simplicity.  I like 3, but I've not
thought it through.  Opinions?

Bill


________________________________________________
Bill Stoddard stoddard@raleigh.ibm.com

Come to the first official Apache Software Foundation
Conference!  <http://ApacheCon.Com/>




Mime
View raw message