To reply to my own message,

I've tested this with mod_ssl loaded statically and as a DSO, it works
great.  No more core dumps when built statically and the memory leak is just
about fixed.  There's still a small memory leak somewhere, the httpd
processes still grow a bit after many (hundreds) gracefuls/restarts, but is
hardly noticable (maybe 100KB or so per process).

-Dave

> After looking at the openssl documentation and the rest of the code in
> ssl_engine_init.c, it looks like we don't want to call those cleanup
> functions when we build statically, but we do when built as a
> module.  This
> patch should fix things up for everyone without re-introducing any memory
> leaks:
>
> --- mod_ssl-2.6.5-1.3.12/pkg.sslmod/ssl_engine_init.c.orig      Tue Jul  4
> 21:21:10 2000
> +++ mod_ssl-2.6.5-1.3.12/pkg.sslmod/ssl_engine_init.c   Thu Jul
> 27 10:17:30
> 2000
> @@ -1025,9 +1025,11 @@
>      /*
>       * Try to kill the internals of the SSL library.
>       */
> +#ifdef SHARED_MODULE
>      ERR_free_strings();
>      ERR_remove_state(0);
>      EVP_cleanup();
> +#endif
>
>      return;
>  }
>
> Let me know if it works to you, and I'll forward it on to Ralf.

______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to