httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject RE: Memory leak in 1.3.6
Date Fri, 06 Aug 1999 16:19:34 GMT
On Wed, 4 Aug 1999, David Harris wrote:

> 
> Here's a patch that solves the memory leak I reported. I think this is the
> right way to do it. We just have to make sure that ap_upload_module is called
> for _all_ of the modules all together. This is the case with mod_so, so things
> are okay.
> 
> Aram, you've verified the leak and have been working with me on this.. do you
> think we can get this committed?
> 
>  - David Harris
>    Principal Engineer, DRH Internet Services
> 
> 
> --- apache_1.3.6/src/main/http_config.c.orig    Wed Aug  4 11:53:41 1999
> +++ apache_1.3.6/src/main/http_config.c Wed Aug  4 11:54:08 1999
> @@ -625,6 +625,7 @@
>      m->module_index = -1;      /* simulate being unloaded, should
>                                  * be unnecessary */
>      dynamic_modules--;
> +    total_modules--;
>  }
> 
>  API_EXPORT(void) ap_add_loaded_module(module *mod)
> 
> 
> 

Not only is there the above bug, but ClearModuleList leaves total_modules
and dynamic_modules set to whatever they were beforehand.  Oops I guess
you shouldn't ever put more than one ClearModuleList in your configuration
file... and doesn't it mess up across restarts? 

Oh!  and you shouldn't ever call ap_remove_module on a statically loaded
module!  because ap_remove_module decrements dynamic_modules, even if it
wasn't incremented when loading the module.

wow.  This stuff is a confusing mess.  I guess I'll apply David's patch,
it can't make it any worse.

Dean



Mime
View raw message