[Webkit-unassigned] [Bug 193177] New: Leak of WTF::Function objects in WebCore::CryptoKeyRSA::generatePair() (64-80 bytes each) in com.apple.WebKit.WebContent running WebKit layout tests

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jan 6 10:45:56 PST 2019


https://bugs.webkit.org/show_bug.cgi?id=193177

            Bug ID: 193177
           Summary: Leak of WTF::Function objects in
                    WebCore::CryptoKeyRSA::generatePair() (64-80 bytes
                    each) in com.apple.WebKit.WebContent running WebKit
                    layout tests
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Keywords: InRadar
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ddkilzer at webkit.org
                CC: bfulgham at webkit.org, jiewen_tan at apple.com

Leak of WTF::Function objects in WebCore::CryptoKeyRSA::generatePair() (64-80 bytes 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: <0x7ffebf90a850>':
[thread 0x70000d866000]:
28  libsystem_pthread.dylib            0x7fff66301445 thread_start + 13
27  libsystem_pthread.dylib            0x7fff663052a7 _pthread_start + 70
26  libsystem_pthread.dylib            0x7fff66302339 _pthread_body + 126
25  com.apple.JavaScriptCore              0x115645cc9 WTF::wtfThreadEntryPoint(void*) + 9  ThreadingPthreads.cpp:203
24  com.apple.JavaScriptCore              0x115644032 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 194  memory:2597
23  com.apple.WebCore                     0x1129e6a06 WebCore::WorkerThread::workerThread() + 1046  RefPtr.h:58
22  com.apple.WebCore                     0x1129e3e00 WebCore::WorkerRunLoop::run(WebCore::WorkerGlobalScope*) + 96  WorkerRunLoop.cpp:138
21  com.apple.WebCore                     0x1129e403d WebCore::WorkerRunLoop::runInMode(WebCore::WorkerGlobalScope*, WebCore::ModePredicate const&, WebCore::WorkerRunLoop::WaitMode) + 477  WorkerRunLoop.cpp:211
20  com.apple.WebCore                     0x1125316d9 WebCore::ThreadTimers::sharedTimerFiredInternal() + 185  ThreadTimers.cpp:120
19  com.apple.WebCore                     0x112086be9 WebCore::MicrotaskQueue::performMicrotaskCheckpoint() + 137  Microtasks.cpp:95
18  com.apple.WebCore                     0x1120058af WebCore::ActiveDOMCallbackMicrotask::run() + 47  Function.h:56
17  com.apple.WebCore                     0x111e04943 WebCore::JSMicrotaskCallback::call() + 67  JSMicrotaskCallback.h:46
16  com.apple.WebCore                     0x111dfd664 WebCore::JSExecState::runTask(JSC::ExecState*, JSC::Microtask&) + 68  JSExecState.h:50
15  com.apple.JavaScriptCore              0x11613f9dd JSC::JSMicrotask::run(JSC::ExecState*) + 461  VM.h:950
14  com.apple.JavaScriptCore              0x1160708f4 JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 196  CallData.cpp:41
13  com.apple.JavaScriptCore              0x115e29f25 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 469  JITCodeInlines.h:39
12  com.apple.JavaScriptCore              0x115851919 vmEntryToJavaScript + 200  LowLevelInterpreter64.asm:295
11                                     0x277493874ff7 0x277493801000 + 475127
10                                     0x27749388199b 0x277493801000 + 526747
9                                      0x27749387a5cd 0x277493801000 + 497101
8                                      0x2774938828a7 0x277493801000 + 530599
7                                      0x277493801eb7 0x277493801000 + 3767
6   com.apple.WebCore                     0x111a7fd97 WebCore::jsSubtleCryptoPrototypeFunctionGenerateKey(JSC::ExecState*) + 567  Vector.h:340
5   com.apple.WebCore                     0x111eb2ca8 WebCore::SubtleCrypto::generateKey(JSC::ExecState&, WTF::Variant<JSC::Strong<JSC::JSObject>, WTF::String>&&, bool, WTF::Vector<WebCore::CryptoKeyUsage, 0ul, WTF::CrashOnOverflow, 16ul>&&, WTF::Ref<WebCore::DeferredPromise, WTF::DumbPtrTraits<WebCore::DeferredPromise> >&&) + 728  memory:2595
4   com.apple.WebCore                     0x111ec84b0 WebCore::CryptoAlgorithmRSA_OAEP::generateKey(WebCore::CryptoAlgorithmParameters const&, bool, int, WTF::Function<void (WTF::Variant<WTF::RefPtr<WebCore::CryptoKey, WTF::DumbPtrTraits<WebCore::CryptoKey> >, WebCore::CryptoKeyPair>&&)>&&, WTF::Function<void (WebCore::ExceptionCode)>&&, WebCore::ScriptExecutionContext&) + 208  CryptoAlgorithmRSA_OAEP.cpp:102
3   com.apple.WebCore                     0x111ed5dcc 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*) + 268  CryptoKeyRSAMac.cpp:305
2   libc++abi.dylib                    0x7fff6383ff48 operator new(unsigned long) + 40
1   libsystem_malloc.dylib             0x7fff662bd783 malloc + 24
0   libsystem_malloc.dylib             0x7fff662bd82b malloc_zone_malloc + 139 
====
    4 (80 bytes) ROOT LEAK: 0x7ffebf90a850 [16]
       3 (64 bytes) <WTF::Function<void (WebCore::CryptoKeyPair&&)>::CallableWrapper<WebCore::CryptoAlgorithmRSA_OAEP::generateKey(WebCore::CryptoAlgorithmParameters const&, bool, int, WTF::Function<void (WTF::Variant<WTF::RefPtr<WebCore::CryptoKey, WTF::DumbPtrTraits<WebCore::CryptoKey> >, WebCore::CryptoKeyPair>&&)>&&, WTF::Function<void (WebCore::ExceptionCode)>&&, WebCore::ScriptExecutionContext&)::$_4> 0x7ffebf90a040> [16]
          2 (48 bytes) <WTF::Function<void (WTF::Variant<WTF::RefPtr<WebCore::CryptoKey, WTF::DumbPtrTraits<WebCore::CryptoKey> >, WebCore::CryptoKeyPair>&&)>::CallableWrapper<WebCore::SubtleCrypto::generateKey(JSC::ExecState&, WTF::Variant<JSC::Strong<JSC::JSObject>, WTF::String>&&, bool, WTF::Vector<WebCore::CryptoKeyUsage, 0ul, WTF::CrashOnOverflow, 16ul>&&, WTF::Ref<WebCore::DeferredPromise, WTF::DumbPtrTraits<WebCore::DeferredPromise> >&&)::$_10> 0x7ffeb7eec550> [32]
             1 (16 bytes) 0x7ffeb7c86960 [16]

STACK OF 1 INSTANCE OF 'ROOT LEAK: <0x7ffebf94d850>':
[thread 0x70000d866000]:
28  libsystem_pthread.dylib            0x7fff66301445 thread_start + 13
27  libsystem_pthread.dylib            0x7fff663052a7 _pthread_start + 70
26  libsystem_pthread.dylib            0x7fff66302339 _pthread_body + 126
25  com.apple.JavaScriptCore              0x115645cc9 WTF::wtfThreadEntryPoint(void*) + 9  ThreadingPthreads.cpp:203
24  com.apple.JavaScriptCore              0x115644032 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 194  memory:2597
23  com.apple.WebCore                     0x1129e6a06 WebCore::WorkerThread::workerThread() + 1046  RefPtr.h:58
22  com.apple.WebCore                     0x1129e3e00 WebCore::WorkerRunLoop::run(WebCore::WorkerGlobalScope*) + 96  WorkerRunLoop.cpp:138
21  com.apple.WebCore                     0x1129e403d WebCore::WorkerRunLoop::runInMode(WebCore::WorkerGlobalScope*, WebCore::ModePredicate const&, WebCore::WorkerRunLoop::WaitMode) + 477  WorkerRunLoop.cpp:211
20  com.apple.WebCore                     0x1125316d9 WebCore::ThreadTimers::sharedTimerFiredInternal() + 185  ThreadTimers.cpp:120
19  com.apple.WebCore                     0x112086be9 WebCore::MicrotaskQueue::performMicrotaskCheckpoint() + 137  Microtasks.cpp:95
18  com.apple.WebCore                     0x1120058af WebCore::ActiveDOMCallbackMicrotask::run() + 47  Function.h:56
17  com.apple.WebCore                     0x111e04943 WebCore::JSMicrotaskCallback::call() + 67  JSMicrotaskCallback.h:46
16  com.apple.WebCore                     0x111dfd664 WebCore::JSExecState::runTask(JSC::ExecState*, JSC::Microtask&) + 68  JSExecState.h:50
15  com.apple.JavaScriptCore              0x11613f9dd JSC::JSMicrotask::run(JSC::ExecState*) + 461  VM.h:950
14  com.apple.JavaScriptCore              0x1160708f4 JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 196  CallData.cpp:41
13  com.apple.JavaScriptCore              0x115e29f25 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 469  JITCodeInlines.h:39
12  com.apple.JavaScriptCore              0x115851919 vmEntryToJavaScript + 200  LowLevelInterpreter64.asm:295
11                                     0x277493874ff7 0x277493801000 + 475127
10                                     0x27749388199b 0x277493801000 + 526747
9                                      0x27749387a5cd 0x277493801000 + 497101
8                                      0x2774938828a7 0x277493801000 + 530599
7                                      0x277493801eb7 0x277493801000 + 3767
6   com.apple.WebCore                     0x111a7fd97 WebCore::jsSubtleCryptoPrototypeFunctionGenerateKey(JSC::ExecState*) + 567  Vector.h:340
5   com.apple.WebCore                     0x111eb2ca8 WebCore::SubtleCrypto::generateKey(JSC::ExecState&, WTF::Variant<JSC::Strong<JSC::JSObject>, WTF::String>&&, bool, WTF::Vector<WebCore::CryptoKeyUsage, 0ul, WTF::CrashOnOverflow, 16ul>&&, WTF::Ref<WebCore::DeferredPromise, WTF::DumbPtrTraits<WebCore::DeferredPromise> >&&) + 728  memory:2595
4   com.apple.WebCore                     0x111ec84b0 WebCore::CryptoAlgorithmRSA_OAEP::generateKey(WebCore::CryptoAlgorithmParameters const&, bool, int, WTF::Function<void (WTF::Variant<WTF::RefPtr<WebCore::CryptoKey, WTF::DumbPtrTraits<WebCore::CryptoKey> >, WebCore::CryptoKeyPair>&&)>&&, WTF::Function<void (WebCore::ExceptionCode)>&&, WebCore::ScriptExecutionContext&) + 208  CryptoAlgorithmRSA_OAEP.cpp:102
3   com.apple.WebCore                     0x111ed5de8 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*) + 296  CryptoKeyRSAMac.cpp:306
2   libc++abi.dylib                    0x7fff6383ff48 operator new(unsigned long) + 40
1   libsystem_malloc.dylib             0x7fff662bd783 malloc + 24
0   libsystem_malloc.dylib             0x7fff662bd82b malloc_zone_malloc + 139 
====
    3 (64 bytes) ROOT LEAK: 0x7ffebf94d850 [16]
       2 (48 bytes) <WTF::Function<void ()>::CallableWrapper<WebCore::CryptoAlgorithmRSA_OAEP::generateKey(WebCore::CryptoAlgorithmParameters const&, bool, int, WTF::Function<void (WTF::Variant<WTF::RefPtr<WebCore::CryptoKey, WTF::DumbPtrTraits<WebCore::CryptoKey> >, WebCore::CryptoKeyPair>&&)>&&, WTF::Function<void (WebCore::ExceptionCode)>&&, WebCore::ScriptExecutionContext&)::$_5> 0x7ffeb93600f0> [16]
          1 (32 bytes) <WTF::Function<void (WebCore::ExceptionCode)>::CallableWrapper<WebCore::SubtleCrypto::generateKey(JSC::ExecState&, WTF::Variant<JSC::Strong<JSC::JSObject>, WTF::String>&&, bool, WTF::Vector<WebCore::CryptoKeyUsage, 0ul, WTF::CrashOnOverflow, 16ul>&&, WTF::Ref<WebCore::DeferredPromise, WTF::DumbPtrTraits<WebCore::DeferredPromise> >&&)::$_11> 0x7ffebfa00170> [32]

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190106/38bb704f/attachment-0001.html>


More information about the webkit-unassigned mailing list