>Number: 540
>Category: mod_dld
>Synopsis: mod_dld corrupts module count
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache (Apache HTTP Project)
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Sun May 4 06:00:02 1997
>Originator: [EMAIL PROTECTED]
>Organization:
apache
>Release: 1.2b7
>Environment:
Irix, version: 5.3
[entered on behalf of user from a mail message]
>Description:
I have written a replacement for the mod_dld Module,
allowing modules in shared libraries.
(will be availible when tested somewhat more)
While testing this, a bug in http_config.c showed
up that most likely will also prevent mod_dld
from working and could cause funny things
together with 'AddModule/ClearModuleList'
The static varible 'num_modules' from http_config.c
is intended to hold the number of active modules.
'add_module' should increase it when a module
is activated, but that never happens because
of http_config.c:398
(*m)->module_index = total_modules;
I recommend to completely remove this line of code.
Otherwise, any call to add_module for
modules not preloaded (i.e. dynamic ones)
will corrupt the data.
By the way, to make dynamic modules work
I also needed a way to increase the static
variable total_modules.
I added a call named 'register_module' to
http_config.c, that increases the counter and
then calls add_module. It would be great if
something like this could be added to the
distribution.
Note:
The original module mod_dld seems to have quite
a lot of problems. I recomend to remove it from
the distribution, unless you have some reports
that it works correctly. (I'm just judging from
the sourcecode: It fails to increase 'total_modules'
when loading new modules, causing memory corruption)
>How-To-Repeat:
>Fix:
>Audit-Trail:
>Unformatted: