httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@organic.com>
Subject Re: AddModule doesn't work correctly (fwd)
Date Thu, 11 Sep 1997 21:55:55 GMT
On Thu, 11 Sep 1997, Dean Gaudet wrote:

> Ewww.  Alexei I'm surprised you haven't run into problems from this on
> WIN32 yet.
>
> void *
> create_empty_config (pool *p)
> {
>    void **conf_vector = (void **)pcalloc(p, sizeof(void*) * total_modules);
>    return (void *)conf_vector;
> }
> 
> Notice total_modules ... this is limited to exactly the total that's
> compiled in at compile time. 

Note quite: create_default_per_dir_config() and create_server_config()
use total_modules + DYNAMIC_MODULE_LIMIT. They are the only ones that are
called before config files are parsed, and any LoadModules are picked
up. create_empty_config() is only called later, after the config files
have been parsed and total_modules is what it says, the total number of
modules you have loaded in:

The 1.2 add_module() is completely screwed up, if you're doing anything
other than a straight ClearModuleList/AddModules. It was broken when the
AddModule code was written, but that code just barely avoided tickling
the bugs. I discovered that when I wrote mod_dll for the Win32 port.

So for 1.3 I rewrote add_module() to increase total_modules when it adds
modules, so any additional config vector creation is at least large
enough (possibly too large, but I don't worry about that too much).

Xavier, try downloading 1.3a1 (or 1.3b1, which should be released
shortly), and see if things work with it. I believe they will.

-- Alexei Kosut <akosut@organic.com>


Mime
View raw message