Shridhar Bhat wrote:
> I have written a server which receives connections from
> SSL clients. I accept SSL connections as well as read the
> data from the client in the following function: DoSSLRead.
> Upon the arrival of the client connection, the SSL_read()
> is called 3 times (2 times for handshake data and once
> for client app data). When I monitor this process through
> top, I see that the process footprint increases by 8kb
> each for first two calls of SSL_read. In the last SSL_read
> call, when I read app data, there is no leak. Thus, for
> every client connection, my process seems to leak 16kb.
> Sometimes, the first SSL_read leaks 12kb.
>
> I am running this app on Redhat Linux 6.2 and tried both
> openssl-0.9.5 and openssl-0.9.6. I would be grateful if
> anybody explains me the reason for the leak. The same
> code works fine on WindowsNT and Purify doesn't show me
> any leaks. Also, the NT performance monitor doesn't show
> any increase in the process footprint size.
There is memory leak tracking code built into OpenSSL;
you have to recompile to use it. (I haven't tried.)
You might also want to try linking on Linux with a free third-party
debugging heap like http://dmalloc.com/
There's a list at
http://www.cs.colorado.edu/homes/zorn/public_html/MallocDebug.html
Let us know what you find.
- Dan
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]