<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>193673</bug_id>
          
          <creation_ts>2019-01-22 09:37:08 -0800</creation_ts>
          <short_desc>Leak of NSMutableArray (128 bytes) in com.apple.WebKit.WebContent running WebKit layout tests</short_desc>
          <delta_ts>2019-01-22 10:15:07 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebGL</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Kilzer (:ddkilzer)">ddkilzer</reporter>
          <assigned_to name="David Kilzer (:ddkilzer)">ddkilzer</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>dino</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>graouts</cc>
    
    <cc>justin_fan</cc>
    
    <cc>kondapallykalyan</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1496792</commentid>
    <comment_count>0</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2019-01-22 09:37:08 -0800</bug_when>
    <thetext>Leak of NSMutableArray (128 bytes) in com.apple.WebKit.WebContent running WebKit layout tests.

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

STACK OF 1 INSTANCE OF &apos;ROOT LEAK: &lt;NSMutableArray&gt;&apos;:
[thread 0x10e2765c0]:
59  libdyld.dylib                      0x7fff7be6d08d start + 1
58  com.apple.WebKit.WebContent           0x10b0587bb invocation function for block in WebKit::XPCServiceEventHandler(NSObject&lt;OS_xpc_object&gt;*) + 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&lt;IPC::Decoder, std::__1::default_delete&lt;IPC::Decoder&gt; &gt;) + 108  memory:2567
43  com.apple.WebKit                      0x10b3be5bf WebKit::NetworkProcessConnection::didReceiveMessage(IPC::Connection&amp;, IPC::Decoder&amp;) + 625  NetworkProcessConnection.cpp:0
42  com.apple.WebKit                      0x10b4a445a WebKit::WebResourceLoader::didReceiveWebResourceLoaderMessage(IPC::Connection&amp;, IPC::Decoder&amp;) + 754  HandleMessage.h:0
41  com.apple.WebKit                      0x10b3c4625 WebKit::WebResourceLoader::didFinishResourceLoad(WebCore::NetworkLoadMetrics const&amp;) + 211  WebResourceLoader.cpp:164
40  com.apple.WebCore                     0x63904fe4f WebCore::SubresourceLoader::didFinishLoading(WebCore::NetworkLoadMetrics const&amp;) + 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&amp;) + 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&amp;) + 35  RefCounted.h:98
35  com.apple.WebCore                     0x638f19b84 WebCore::HTMLDocumentParser::notifyFinished(WebCore::PendingScript&amp;) + 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&amp;) + 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&lt;WebCore::ScriptElement, WTF::DumbPtrTraits&lt;WebCore::ScriptElement&gt; &gt;&amp;&amp;, WTF::TextPosition const&amp;) + 48  RefPtr.h:81
29  com.apple.WebCore                     0x638f25199 WebCore::HTMLScriptRunner::runScript(WebCore::ScriptElement&amp;, WTF::TextPosition const&amp;) + 89  ScriptElement.h:61
28  com.apple.WebCore                     0x638d20ebf WebCore::ScriptElement::prepareScript(WTF::TextPosition const&amp;, WebCore::ScriptElement::LegacyTypeSupport) + 1231  CachedResourceHandle.h:61
27  com.apple.WebCore                     0x638d22ac3 WebCore::ScriptElement::executeClassicScript(WebCore::ScriptSourceCode const&amp;) + 563  CurrentScriptIncrementer.h:54
26  com.apple.WebCore                     0x638a89d4f WebCore::ScriptController::evaluateInWorld(WebCore::ScriptSourceCode const&amp;, WebCore::DOMWrapperWorld&amp;, WebCore::ExceptionDetails*) + 207  ScriptController.cpp:131
25  com.apple.WebCore                     0x638a89f0b WebCore::JSExecState::profiledEvaluate(JSC::ExecState*, JSC::ProfilingReason, JSC::SourceCode const&amp;, JSC::JSValue, WTF::NakedPtr&lt;JSC::Exception&gt;&amp;) + 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&amp;) + 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&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 196  CallData.cpp:41
17  com.apple.JavaScriptCore              0x63cac3065 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 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&amp;&amp;) const + 116  Vector.h:340
8   com.apple.WebCore                     0x63928f9de WebCore::GPUDevice::tryCreateBindGroupLayout(WebCore::GPUBindGroupLayoutDescriptor&amp;&amp;) const + 14  GPUDevice.cpp:51
7   com.apple.WebCore                     0x6382781c5 WebCore::GPUBindGroupLayout::tryCreate(WebCore::GPUDevice const&amp;, WebCore::GPUBindGroupLayoutDescriptor&amp;&amp;) + 213  utility:897
6   com.apple.WebCore                     0x638278435 WebCore::appendArgumentToArray(WTF::RetainPtr&lt;NSMutableArray&lt;MTLArgumentDescriptor*&gt; &gt;, WTF::RetainPtr&lt;MTLArgumentDescriptor&gt;) + 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: &lt;NSMutableArray 0x7fdf0be2ff80&gt; [48]
       2 (80 bytes) &lt;NSMutableArray (Storage) 0x7fdf0be259f0&gt; [16]
          1 (64 bytes) &lt;MTLArgumentDescriptorInternal 0x7fdf0be2fef0&gt; [64]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1496793</commentid>
    <comment_count>1</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2019-01-22 09:37:20 -0800</bug_when>
    <thetext>&lt;rdar://problem/47448241&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1496795</commentid>
    <comment_count>2</comment_count>
      <attachid>359743</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2019-01-22 09:42:10 -0800</bug_when>
    <thetext>Created attachment 359743
Patch v1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1496810</commentid>
    <comment_count>3</comment_count>
      <attachid>359743</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-01-22 10:15:06 -0800</bug_when>
    <thetext>Comment on attachment 359743
Patch v1

Clearing flags on attachment: 359743

Committed r240256: &lt;https://trac.webkit.org/changeset/240256&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1496811</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-01-22 10:15:07 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>359743</attachid>
            <date>2019-01-22 09:42:10 -0800</date>
            <delta_ts>2019-01-22 10:15:06 -0800</delta_ts>
            <desc>Patch v1</desc>
            <filename>bug-193673-20190122094209.patch</filename>
            <type>text/plain</type>
            <size>1585</size>
            <attacher name="David Kilzer (:ddkilzer)">ddkilzer</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjQwMjUyCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggODQ3NTJjNTE5MDdmNDJk
ZDdmNThhOWM5YTI4YWIxM2NmMDgxYjc2Yi4uODc1YzFlNDc0NGFkYmRkMWVmMzFmYmQ2ZDdjOTZm
OTgxYzBjNzBhMyAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE0IEBACisyMDE5LTAxLTIyICBEYXZp
ZCBLaWx6ZXIgIDxkZGtpbHplckBhcHBsZS5jb20+CisKKyAgICAgICAgTGVhayBvZiBOU011dGFi
bGVBcnJheSAoMTI4IGJ5dGVzKSBpbiBjb20uYXBwbGUuV2ViS2l0LldlYkNvbnRlbnQgcnVubmlu
ZyBXZWJLaXQgbGF5b3V0IHRlc3RzCisgICAgICAgIDxodHRwczovL3dlYmtpdC5vcmcvYi8xOTM2
NzM+CisgICAgICAgIDxyZGFyOi8vcHJvYmxlbS80NzQ0ODI0MT4KKworICAgICAgICBSZXZpZXdl
ZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICAqIHBsYXRmb3JtL2dyYXBoaWNzL2dwdS9j
b2NvYS9HUFVCaW5kR3JvdXBMYXlvdXRNZXRhbC5tbToKKyAgICAgICAgKFdlYkNvcmU6OmFwcGVu
ZEFyZ3VtZW50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