Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » WebSSL memory leak problem.
Re: WebSSL memory leak problem. [message #26756 is a reply to message #26619] Wed, 26 May 2010 12:00 Go to previous messageGo to previous message
rylek is currently offline  rylek
Messages: 79
Registered: November 2005
Member
Hello there!

I'm afraid that commenting out CRYPTO_set_mem_functions doesn't remove the memory leaks, it just hides them because OpenSSL then uses standard C allocator instead of the one in U++. In a similar vein, getting rid of SSL_library_init() is in my opinion a bad idea either. Some time ago when debugging a https client using the Web/SSL package I also started to receive some memory leaks, but after recompiling an updated version of OpenSSL they disappeared.

In order to be able to debug this kind of leaks, a long time ago I added a simple memory allocation logging feature to Web/SSL (just set LOG_UPP_SSL_MALLOC to 1). The last time I was tracing the leaks, they seemed related to certain global tables allocated during the SSL library initialization (which might explain why removing the initialization call seemingly removed the problem). However, as I said, after recompiling the OpenSSL they disappeared altogether so I honestly didn't continue to pursue the problem.

Please also note that serious havoc would result from linking your application to OpenSSL compiled with a different build style (MT vs ST, shared vs static libraries). When recompiling OpenSSL it is good to note which /M flag the make sends to the compiler (at least this holds when compiling under 32-bit MSVC 7.1, which is what I did). In any case if you fail to get rid of the leaks, I can at least try to post somewhere the compiled OpenSSL libraries (libeay / ssleay) which do work for me so that you can try them out. I hope the Web/SSL package is not discontinued, it's just that getting rid of memory leaks in code you didn't write is sometimes quite complicated. Which of course doesn't mean we should ignore them.

Regards

Tomas
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: CoWork tidy up
Next Topic: SSL patch
Goto Forum:
  


Current Time: Sun May 05 18:11:06 CEST 2024

Total time taken to generate the page: 0.02929 seconds