Bug 198538 - REGRESSION (r244557): Leak of WKNSString in WTR::runOpenPanel() while running WebKit layout tests
Summary: REGRESSION (r244557): Leak of WKNSString in WTR::runOpenPanel() while running...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on: 195537
Blocks:
  Show dependency treegraph
 
Reported: 2019-06-04 11:51 PDT by David Kilzer (:ddkilzer)
Modified: 2019-06-04 15:56 PDT (History)
5 users (show)

See Also:


Attachments
Patch v1 (2.14 KB, patch)
2019-06-04 11:56 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2019-06-04 11:51:28 PDT
Leak of WKNSString in WTR::runOpenPanel() while running WebKit layout tests.

Example leak:

STACK OF 5 INSTANCES OF 'ROOT LEAK: <WKNSString>':
38  libdyld.dylib                      0x7fff520426a5 start + 1
37  org.webkit.WebKitTestRunnerApp        0x10fb4147f main + 114
36  com.apple.UIKitCore                0x7fff47c6e809 UIApplicationMain + 1621
35  com.apple.GraphicsServices         0x7fff379639f8 GSEventRunModal + 65
34  com.apple.CoreFoundation           0x7fff23a86466 CFRunLoopRunSpecific + 438
33  com.apple.CoreFoundation           0x7fff23a86c7f __CFRunLoopRun + 1263
32  com.apple.CoreFoundation           0x7fff23a8bfbc __CFRunLoopDoSources0 + 268
31  com.apple.CoreFoundation           0x7fff23a8c791 __CFRunLoopDoSource0 + 81
30  com.apple.CoreFoundation           0x7fff23a8c801 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
29  com.apple.Foundation               0x7fff255f0bf3 __NSThreadPerformPerform + 259
28  org.webkit.WebKitTestRunnerApp        0x10fb41378 -[WebKitTestRunnerApp _runTestController] + 40
27  org.webkit.WebKitTestRunnerApp        0x10fb49fd9 WTR::TestController::TestController(int, char const**) + 395
26  org.webkit.WebKitTestRunnerApp        0x10fb50c86 WTR::TestController::runTestingServerLoop() + 132
25  org.webkit.WebKitTestRunnerApp        0x10fb5088d WTR::TestController::runTest(char const*) + 1933
24  org.webkit.WebKitTestRunnerApp        0x10fb5f8f8 WTR::TestInvocation::invoke() + 306
23  org.webkit.WebKitTestRunnerApp        0x10fb5df6d WTR::TestController::platformRunUntil(bool&, WTF::Seconds) + 183
22  com.apple.Foundation               0x7fff255daa46 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 211
21  com.apple.CoreFoundation           0x7fff23a86466 CFRunLoopRunSpecific + 438
20  com.apple.CoreFoundation           0x7fff23a86c7f __CFRunLoopRun + 1263
19  com.apple.CoreFoundation           0x7fff23a8bfbc __CFRunLoopDoSources0 + 268
18  com.apple.CoreFoundation           0x7fff23a8c791 __CFRunLoopDoSource0 + 81
17  com.apple.CoreFoundation           0x7fff23a8c801 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
16  JavaScriptCore                        0x110527c92 WTF::RunLoop::performWork(void*) + 34  RunLoopCF.cpp:39
15  JavaScriptCore                        0x110527a04 WTF::RunLoop::performWork() + 228  Function.h:0
14  com.apple.WebKit                      0x1116bd484 IPC::Connection::dispatchIncomingMessages() + 586  memory:2650
13  com.apple.WebKit                      0x1116bac28 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) + 108  memory:2621
12  com.apple.WebKit                      0x111914bea WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 24  WebProcessProxy.cpp:628
11  com.apple.WebKit                      0x1116ce81e IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) + 114  MessageReceiverMap.cpp:0
10  com.apple.WebKit                      0x111b339ed void IPC::handleMessage<Messages::WebPageProxy::RunOpenPanel, WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(unsigned long long, WebCore::SecurityOriginData const&, WebCore::FileChooserSettings const&)>(IPC::Decoder&, WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(unsigned long long, WebCore::SecurityOriginData const&, WebCore::FileChooserSettings const&)) + 92  HandleMessage.h:0
9   com.apple.WebKit                      0x1118e267d WebKit::WebPageProxy::runOpenPanel(unsigned long long, WebCore::SecurityOriginData const&, WebCore::FileChooserSettings const&) + 299  WebPageProxy.cpp:5382
8   com.apple.WebKit                      0x111982bda WKPageSetPageUIClient::UIClient::runOpenPanel(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebCore::SecurityOriginData const&, API::OpenPanelParameters*, WebKit::WebOpenPanelResultListenerProxy*) + 100  WKPage.cpp:0
7   org.webkit.WebKitTestRunnerApp        0x10fb4aa2e WTR::runOpenPanel(OpaqueWKPage const*, OpaqueWKFrame const*, OpaqueWKOpenPanelParameters const*, OpaqueWKOpenPanelResultListener const*, void const*) + 110
6   com.apple.WebKit                      0x111832876 WKURLCopyLastPathComponent + 46  utility:925
5   com.apple.WebKit                      0x11197e505 API::String::create(WTF::String const&) + 37  utility:925
4   com.apple.WebKit                      0x111852e4f API::String::create(WTF::String&&) + 31  APIObject.h:267
3   com.apple.WebKit                      0x1117cb2a1 API::Object::newObject(unsigned long, API::Object::Type) + 207  APIObject.mm:0
2   libobjc.A.dylib                    0x7fff5116e10c class_createInstance + 38
1   libsystem_malloc.dylib             0x7fff521f7b3f calloc + 24
0   libsystem_malloc.dylib             0x7fff521f7490 malloc_zone_calloc + 139 
====
    10 (416 bytes) << TOTAL >>
      ----
      2 (96 bytes) ROOT LEAK: <WKNSString 0x600003b00450> [48]
         1 (48 bytes) 0x7fcdf8c001f0 [48]
      ----
      2 (80 bytes) ROOT LEAK: <WKNSString 0x600003b09950> [48]
         1 (32 bytes) 0x7fce11000530 [32]
      ----
      2 (80 bytes) ROOT LEAK: <WKNSString 0x600003b1d8f0> [48]
         1 (32 bytes) 0x7fcde8d22bd0 [32]
      ----
      2 (80 bytes) ROOT LEAK: <WKNSString 0x600003b44660> [48]
         1 (32 bytes) 0x7fce0ed04020 [32]
      ----
      2 (80 bytes) ROOT LEAK: <WKNSString 0x600003be96e0> [48]
         1 (32 bytes) 0x7fce110497d0 [32]
Comment 1 David Kilzer (:ddkilzer) 2019-06-04 11:51:52 PDT
<rdar://problem/51407719>
Comment 2 David Kilzer (:ddkilzer) 2019-06-04 11:56:31 PDT
Created attachment 371313 [details]
Patch v1
Comment 3 David Kilzer (:ddkilzer) 2019-06-04 12:29:56 PDT
Waiting for EWS to complete before adding CQ+.
Comment 4 WebKit Commit Bot 2019-06-04 15:56:43 PDT
Comment on attachment 371313 [details]
Patch v1

Clearing flags on attachment: 371313

Committed r246085: <https://trac.webkit.org/changeset/246085>
Comment 5 WebKit Commit Bot 2019-06-04 15:56:44 PDT
All reviewed patches have been landed.  Closing bug.