http://bugs.winehq.org/show_bug.cgi?id=20679
Summary: Memory leak in CertOpenSystemStore()? Product: Wine Version: 1.1.32 Platform: PC OS/Version: Linux Status: NEW Keywords: download, source Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
The command valgrind --trace-children=yes --leak-check=full wine net_unittests.exe --gtest_filter=SSLClientSocketTest.Connect:SSLClientSocketTest.ConnectExpired:SSLClientSocketTest.ConnectMismatched showed the memory leak
556 bytes in 1 blocks are definitely lost in loss record 843 of 1,024 at notify_alloc (heap.c:214) by RtlAllocateHeap (heap.c:1421) by new_object (handle.c:359) by new_key_container (rsaenh.c:1244) by RSAENH_CPAcquireContext (rsaenh.c:1755) by CryptAcquireContextW (crypt.c:505) by CRYPT_GetDefaultProvider (main.c:67) by CryptHashCertificate (cert.c:1875) by CertContext_GetHashProp (cert.c:214) by CertContext_GetProperty (cert.c:268) by CertGetCertificateContextProperty (cert.c:409) by CertAddCertificateContextToStore (store.c:863) by CertAddEncodedCertificateToStore (cert.c:65) by import_base64_certs_from_fp (rootstore.c:139) by import_certs_from_file (rootstore.c:317) by import_certs_from_path (rootstore.c:387) by read_trusted_roots_from_known_locations (rootstore.c:719) by create_root_store (rootstore.c:742) by CRYPT_RootOpenStore (rootstore.c:764) by CRYPT_SysRegOpenStoreW (store.c:379) by CertOpenStore (store.c:816) by CRYPT_SysOpenStoreW (store.c:548) by CertOpenStore (store.c:816) by CertOpenSystemStoreW (store.c:840) by net::TestServerLauncher::CheckCATrusted (ssl_test_util.cc:414)
Offhand it looks like the app code, at line 414 of http://src.chromium.org/viewvc/chrome/trunk/src/net/socket/ssl_test_util.cc is doing the right thing.
I can provide a log if needed.
To reproduce, wget http://kegel.com/wine/chromium/chromium-tests.tar.bz2 tar -xjvf chromium-tests.tar.bz2 valgrind --trace-children=yes --leak-check=full wine src/chrome/Debug/net_unittests.exe --gtest_filter=SSLClientSocketTest.Connect:SSLClientSocketTest.ConnectExpired:SSLClientSocketTest.ConnectMismatched
(probably you don't need to run all three tests, but that's what I did)
http://bugs.winehq.org/show_bug.cgi?id=20679
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID
--- Comment #1 from Juan Lang juan_lang@yahoo.com 2009-11-12 11:26:07 --- Not a leak. This one: by CRYPT_GetDefaultProvider (main.c:67) always indicates a false positive. The reason is crypt32 can't free the default provider when the app quits, because rsaenh may already have been unloaded. Always freeing it sometimes results in a crash, which was bug 11052.
(This isn't the first time I've told you this, Dan.)
http://bugs.winehq.org/show_bug.cgi?id=20679
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Dan Kegel dank@kegel.com 2009-11-12 12:08:37 --- Sorry, I'm juggling a lot of balls, and dropped that one. Suppression committed, http://code.google.com/p/winezeug/source/detail?r=797 Thanks!