Leak of two CCRSACryptorRef (4.0 Kbytes/1 page each) in com.apple.WebKit.WebContent running WebKit layout tests. $ ./Tools/Scripts/run-webkit-tests --no-build --debug --batch-size=1000 --child-processes=1 --verbose --leaks --no-retry --no-show-results imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-OAEP.https.any.worker.html NOTE: Requires changes to run-webkit-tests to support --leaks with WebKit2. STACK OF 1 INSTANCE OF 'ROOT LEAK: <0x7fa756846a00>': [thread 0x700005520000]: 11 libsystem_pthread.dylib 0x7fff66301435 start_wqthread + 13 10 libsystem_pthread.dylib 0x7fff6630170e _pthread_wqthread + 619 9 libdispatch.dylib 0x7fff660d04bd _dispatch_worker_thread2 + 90 8 libdispatch.dylib 0x7fff660cfd26 _dispatch_root_queue_drain + 325 7 libdispatch.dylib 0x7fff660c4240 _dispatch_queue_override_invoke + 767 6 libdispatch.dylib 0x7fff660c1dcf _dispatch_client_callout + 8 5 libdispatch.dylib 0x7fff660c0d53 _dispatch_call_block_and_release + 12 4 com.apple.WebCore 0x1084b9ff7 invocation function for block in WebCore::CryptoKeyRSA::generatePair(WebCore::CryptoAlgorithmIdentifier, WebCore::CryptoAlgorithmIdentifier, bool, unsigned int, WTF::Vector<unsigned char, 0ul, WTF::CrashOnOverflow, 16ul> const&, bool, int, WTF::Function<void (WebCore::CryptoKeyPair&&)>&&, WTF::Function<void ()>&&, WebCore::ScriptExecutionContext*) + 39 CryptoKeyRSAMac.cpp:323 3 libcommonCrypto.dylib 0x7fff65f9d3e2 CCRSACryptorGeneratePair + 243 2 libcommonCrypto.dylib 0x7fff65f9d499 CCRSACryptorGetPublicKeyFromPrivateKey + 30 1 libsystem_malloc.dylib 0x7fff662bd783 malloc + 24 0 libsystem_malloc.dylib 0x7fff662bd82b malloc_zone_malloc + 139 ==== 1 (4.00K) ROOT LEAK: 0x7fa756846a00 [4096] STACK OF 1 INSTANCE OF 'ROOT LEAK: <0x7fa7582d1000>': [thread 0x700005520000]: 10 libsystem_pthread.dylib 0x7fff66301435 start_wqthread + 13 9 libsystem_pthread.dylib 0x7fff6630170e _pthread_wqthread + 619 8 libdispatch.dylib 0x7fff660d04bd _dispatch_worker_thread2 + 90 7 libdispatch.dylib 0x7fff660cfd26 _dispatch_root_queue_drain + 325 6 libdispatch.dylib 0x7fff660c4240 _dispatch_queue_override_invoke + 767 5 libdispatch.dylib 0x7fff660c1dcf _dispatch_client_callout + 8 4 libdispatch.dylib 0x7fff660c0d53 _dispatch_call_block_and_release + 12 3 com.apple.WebCore 0x1084b9ff7 invocation function for block in WebCore::CryptoKeyRSA::generatePair(WebCore::CryptoAlgorithmIdentifier, WebCore::CryptoAlgorithmIdentifier, bool, unsigned int, WTF::Vector<unsigned char, 0ul, WTF::CrashOnOverflow, 16ul> const&, bool, int, WTF::Function<void (WebCore::CryptoKeyPair&&)>&&, WTF::Function<void ()>&&, WebCore::ScriptExecutionContext*) + 39 CryptoKeyRSAMac.cpp:323 2 libcommonCrypto.dylib 0x7fff65f9d396 CCRSACryptorGeneratePair + 167 1 libsystem_malloc.dylib 0x7fff662bd783 malloc + 24 0 libsystem_malloc.dylib 0x7fff662bd82b malloc_zone_malloc + 139 ==== 1 (4.00K) ROOT LEAK: 0x7fa7582d1000 [4096] 
<rdar://problem/47052993>
Created attachment 358350 [details] Patch v1
Comment on attachment 358350 [details] Patch v1 Checking EWS for GTK/WPE.
Created attachment 358356 [details] Patch v2
(In reply to David Kilzer (:ddkilzer) from comment #3) > Comment on attachment 358350 [details] > Patch v1 > > Checking EWS for GTK/WPE. Oops, this patch was made on a working directory prior to the WTF::Optional changes.
(In reply to David Kilzer (:ddkilzer) from comment #5) > (In reply to David Kilzer (:ddkilzer) from comment #3) > > Comment on attachment 358350 [details] > > Patch v1 > > > > Checking EWS for GTK/WPE. > > Oops, this patch was made on a working directory prior to the WTF::Optional > changes. I hit that as well.
Comment on attachment 358356 [details] Patch v2 Attachment 358356 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/10634982 New failing tests: http/wpt/css/css-animations/start-animation-001.html
Created attachment 358408 [details] Archive of layout-test-results from ews117 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-sierra Platform: Mac OS X 10.12.6
Created attachment 358411 [details] Patch v3
Created attachment 358413 [details] Patch v4
Comment on attachment 358413 [details] Patch v4 GTK/WPE ports finally build. Marking this for review.
Comment on attachment 358413 [details] Patch v4 Attachment 358413 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/10636467 New failing tests: http/wpt/css/css-animations/start-animation-001.html
Created attachment 358426 [details] Archive of layout-test-results from ews116 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-sierra Platform: Mac OS X 10.12.6
Created attachment 358434 [details] Patch v5 - Add 'virtual' back to CryptoKeyRSA destructor. - Rename struct WKCCRSACryptorRefDeleter to WebCore::CCRSACryptorRefDeleter.
Created attachment 358435 [details] Patch v6 - Fix declaration of struct WebCore::CCRSACryptorRefDeleter.
Comment on attachment 358435 [details] Patch v6 View in context: https://bugs.webkit.org/attachment.cgi?id=358435&action=review Looks good. > Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp:73 > + CCCryptorStatus status = CCRSAGetKeyComponents(keyIsPublic ? rsaKey.get() : publicKeyFromPrivateKey.get(), modulus.data(), &modulusLength, publicExponent.data(), &exponentLength, 0, 0, 0, 0); Nice!
Comment on attachment 358435 [details] Patch v6 Clearing flags on attachment: 358435 Committed r239662: <https://trac.webkit.org/changeset/239662>
All reviewed patches have been landed. Closing bug.