Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
4.7.0
-
None
-
Mac 10.5
-
d4d7f3575c229848f08c7df75a1281755d6c41a8
Description
[Update]: this is still a problem on Qt4.7 from the 27th July 2010 - using the test programs enclosed, I can see a memory leak on the client side. I tested using Mac 10.5 where Qt was compiled using -openssl.
–
This leak is apparent when using a subclass of the QSslSocket.
The attached example demonstrates the memory leak, but only with SSL enabled. Non-SSL will use the same class but with no memory leak.
in order to observe this leak, the server and client in the attached example need to be
run in separate processes. I just performed a test as follows:
process 1: >./SSL_Leak_Test 1 1 // this will start a server process
using SSL
process 2: > ./SSL_Leak_Test 2 1 // this will start a client process
using SSL
where process 2 (the client with the leak) climbs slowly to 9.36MB
of memory, which is never reclaimed; even after the socket is
destructed. This is exactly the problem we're having at Filewave.
I suggest making it more obvious and observable by increasing the
following parameter in Globals.cpp:
quint32 LeakGlobals::CLIENT_WRITE_ITERATIONS // from = 50,000 to
500,000.
This takes a little while, but you should observe about 52MB of
memory which is never reclaimed.
Attachments
Issue Links
- relates to
-
QTBUG-5645 SSL Memory leaks on Mac.
- Closed