Bug 193673 - Leak of NSMutableArray (128 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
Summary: Leak of NSMutableArray (128 bytes) in com.apple.WebKit.WebContent running Web...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-22 09:37 PST by David Kilzer (:ddkilzer)
Modified: 2019-01-22 10:15 PST (History)
8 users (show)

See Also:


Attachments
Patch v1 (1.55 KB, patch)
2019-01-22 09:42 PST, 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-01-22 09:37:08 PST
Leak of NSMutableArray (128 bytes) in com.apple.WebKit.WebContent running WebKit layout tests.

NOTE: I didn't spend time finding which test(s) reproduced this since the fix was obvious by source code inspection.

STACK OF 1 INSTANCE OF 'ROOT LEAK: <NSMutableArray>':
[thread 0x10e2765c0]:
59  libdyld.dylib                      0x7fff7be6d08d start + 1
58  com.apple.WebKit.WebContent           0x10b0587bb invocation function for block in WebKit::XPCServiceEventHandler(NSObject<OS_xpc_object>*) + 0  XPCServiceMain.mm:46
57  com.apple.WebKit.WebContent           0x10b058636 WebKit::XPCServiceMain(int, char const**) + 547  XPCServiceMain.mm:0
56  libxpc.dylib                       0x7fff7c0a39e5 _xpc_copy_xpcservice_dictionary + 0
55  libxpc.dylib                       0x7fff7c0a3ee6 _xpc_objc_main + 555
54  com.apple.Foundation               0x7fff50f7828f -[NSRunLoop(NSRunLoop) run] + 76
53  com.apple.Foundation               0x7fff50f783ba -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 280
52  com.apple.CoreFoundation           0x7fff4ebf3be6 CFRunLoopRunSpecific + 467
51  com.apple.CoreFoundation           0x7fff4ebf4303 __CFRunLoopRun + 1226
50  com.apple.CoreFoundation           0x7fff4ebf4d5c __CFRunLoopDoSources0 + 195
49  com.apple.CoreFoundation           0x7fff4ec10eaf __CFRunLoopDoSource0 + 108
48  com.apple.CoreFoundation           0x7fff4ec10f09 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
47  com.apple.JavaScriptCore              0x63c2c32e2 WTF::RunLoop::performWork(void*) + 34  RunLoopCF.cpp:39
46  com.apple.JavaScriptCore              0x63c2c30a9 WTF::RunLoop::performWork() + 313  Function.h:56
45  com.apple.WebKit                      0x10b0754d4 IPC::Connection::dispatchOneIncomingMessage() + 180  Connection.cpp:1074
44  com.apple.WebKit                      0x10b071bf2 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) + 108  memory:2567
43  com.apple.WebKit                      0x10b3be5bf WebKit::NetworkProcessConnection::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 625  NetworkProcessConnection.cpp:0
42  com.apple.WebKit                      0x10b4a445a WebKit::WebResourceLoader::didReceiveWebResourceLoaderMessage(IPC::Connection&, IPC::Decoder&) + 754  HandleMessage.h:0
41  com.apple.WebKit                      0x10b3c4625 WebKit::WebResourceLoader::didFinishResourceLoad(WebCore::NetworkLoadMetrics const&) + 211  WebResourceLoader.cpp:164
40  com.apple.WebCore                     0x63904fe4f WebCore::SubresourceLoader::didFinishLoading(WebCore::NetworkLoadMetrics const&) + 719  ResourceLoader.h:161
39  com.apple.WebCore                     0x63908119c WebCore::CachedResource::checkNotify() + 332  CachedResource.cpp:354
38  com.apple.WebCore                     0x638cf04e8 WebCore::LoadableClassicScript::notifyFinished(WebCore::CachedResource&) + 1352  LoadableClassicScript.cpp:118
37  com.apple.WebCore                     0x638cf066c WebCore::LoadableScript::notifyClientFinished() + 300  LoadableScript.cpp:59
36  com.apple.WebCore                     0x638d0a7b3 WebCore::PendingScript::notifyFinished(WebCore::LoadableScript&) + 35  RefCounted.h:98
35  com.apple.WebCore                     0x638f19b84 WebCore::HTMLDocumentParser::notifyFinished(WebCore::PendingScript&) + 84  RefCounted.h:98
34  com.apple.WebCore                     0x638f199a9 WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution() + 137  DocumentParser.h:70
33  com.apple.WebCore                     0x638f18884 WebCore::HTMLDocumentParser::pumpTokenizer(WebCore::HTMLDocumentParser::SynchronousMode) + 116  DocumentParser.h:69
32  com.apple.WebCore                     0x638f18eb7 WebCore::HTMLDocumentParser::pumpTokenizerLoop(WebCore::HTMLDocumentParser::SynchronousMode, bool, WebCore::PumpSession&) + 599  HTMLDocumentParser.cpp:254
31  com.apple.WebCore                     0x638f18c01 WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder() + 369  Ref.h:59
30  com.apple.WebCore                     0x638f250f0 WebCore::HTMLScriptRunner::execute(WTF::Ref<WebCore::ScriptElement, WTF::DumbPtrTraits<WebCore::ScriptElement> >&&, WTF::TextPosition const&) + 48  RefPtr.h:81
29  com.apple.WebCore                     0x638f25199 WebCore::HTMLScriptRunner::runScript(WebCore::ScriptElement&, WTF::TextPosition const&) + 89  ScriptElement.h:61
28  com.apple.WebCore                     0x638d20ebf WebCore::ScriptElement::prepareScript(WTF::TextPosition const&, WebCore::ScriptElement::LegacyTypeSupport) + 1231  CachedResourceHandle.h:61
27  com.apple.WebCore                     0x638d22ac3 WebCore::ScriptElement::executeClassicScript(WebCore::ScriptSourceCode const&) + 563  CurrentScriptIncrementer.h:54
26  com.apple.WebCore                     0x638a89d4f WebCore::ScriptController::evaluateInWorld(WebCore::ScriptSourceCode const&, WebCore::DOMWrapperWorld&, WebCore::ExceptionDetails*) + 207  ScriptController.cpp:131
25  com.apple.WebCore                     0x638a89f0b WebCore::JSExecState::profiledEvaluate(JSC::ExecState*, JSC::ProfilingReason, JSC::SourceCode const&, JSC::JSValue, WTF::NakedPtr<JSC::Exception>&) + 123  JSExecState.h:0
24  com.apple.WebCore                     0x638a758d3 WebCore::JSExecState::didLeaveScriptContext(JSC::ExecState*) + 35  memory:2583
23  com.apple.WebCore                     0x638cf3599 WebCore::MicrotaskQueue::performMicrotaskCheckpoint() + 137  Microtasks.cpp:95
22  com.apple.WebCore                     0x638c71faf WebCore::ActiveDOMCallbackMicrotask::run() + 47  Function.h:56
21  com.apple.WebCore                     0x638a70f73 WebCore::JSMicrotaskCallback::call() + 67  JSMicrotaskCallback.h:46
20  com.apple.WebCore                     0x638a69d24 WebCore::JSExecState::runTask(JSC::ExecState*, JSC::Microtask&) + 68  JSExecState.h:50
19  com.apple.JavaScriptCore              0x63cdd93bd JSC::JSMicrotask::run(JSC::ExecState*) + 461  VM.h:952
18  com.apple.JavaScriptCore              0x63cd0a234 JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 196  CallData.cpp:41
17  com.apple.JavaScriptCore              0x63cac3065 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 469  JITCodeInlines.h:39
16  com.apple.JavaScriptCore              0x63c4e8e99 vmEntryToJavaScript + 200  LowLevelInterpreter64.asm:295
15  com.apple.JavaScriptCore              0x63c4f8081 llint_entry + 61486  LowLevelInterpreter.asm:899
14  com.apple.JavaScriptCore              0x63c4f800e llint_entry + 61371  LowLevelInterpreter.asm:899
13  com.apple.JavaScriptCore              0x63c4f8081 llint_entry + 61486  LowLevelInterpreter.asm:899
12  com.apple.JavaScriptCore              0x63c4f8081 llint_entry + 61486  LowLevelInterpreter.asm:899
11                                     0x4c591ae01177 0x4c591ae01000 + 375
10  com.apple.WebCore                     0x63879032c WebCore::jsWebGPUDevicePrototypeFunctionCreateBindGroupLayout(JSC::ExecState*) + 268  DumbPtrTraits.h:41
9   com.apple.WebCore                     0x6389ccac4 WebCore::WebGPUDevice::createBindGroupLayout(WebCore::GPUBindGroupLayoutDescriptor&&) const + 116  Vector.h:340
8   com.apple.WebCore                     0x63928f9de WebCore::GPUDevice::tryCreateBindGroupLayout(WebCore::GPUBindGroupLayoutDescriptor&&) const + 14  GPUDevice.cpp:51
7   com.apple.WebCore                     0x6382781c5 WebCore::GPUBindGroupLayout::tryCreate(WebCore::GPUDevice const&, WebCore::GPUBindGroupLayoutDescriptor&&) + 213  utility:897
6   com.apple.WebCore                     0x638278435 WebCore::appendArgumentToArray(WTF::RetainPtr<NSMutableArray<MTLArgumentDescriptor*> >, WTF::RetainPtr<MTLArgumentDescriptor>) + 85  GPUBindGroupLayoutMetal.mm:58
5   com.apple.CoreFoundation           0x7fff4ec354c7 -[NSArray initWithObjects:] + 566
4   com.apple.CoreFoundation           0x7fff4ebcddc4 +[__NSArrayM __new:::] + 36
3   com.apple.CoreFoundation           0x7fff4ebbd249 __CFAllocateObject2 + 15
2   libobjc.A.dylib                    0x7fff7ad973f0 class_createInstance + 83
1   libsystem_malloc.dylib             0x7fff7c01ccba calloc + 30
0   libsystem_malloc.dylib             0x7fff7c01cd62 malloc_zone_calloc + 139 
====
    3 (128 bytes) ROOT LEAK: <NSMutableArray 0x7fdf0be2ff80> [48]
       2 (80 bytes) <NSMutableArray (Storage) 0x7fdf0be259f0> [16]
          1 (64 bytes) <MTLArgumentDescriptorInternal 0x7fdf0be2fef0> [64]
Comment 1 David Kilzer (:ddkilzer) 2019-01-22 09:37:20 PST
<rdar://problem/47448241>
Comment 2 David Kilzer (:ddkilzer) 2019-01-22 09:42:10 PST
Created attachment 359743 [details]
Patch v1
Comment 3 WebKit Commit Bot 2019-01-22 10:15:06 PST
Comment on attachment 359743 [details]
Patch v1

Clearing flags on attachment: 359743

Committed r240256: <https://trac.webkit.org/changeset/240256>
Comment 4 WebKit Commit Bot 2019-01-22 10:15:07 PST
All reviewed patches have been landed.  Closing bug.