<?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>197965</bug_id>
          
          <creation_ts>2019-05-16 15:29:37 -0700</creation_ts>
          <short_desc>REGRESSION (r84160): Leak of OpaqueJSString under WTR::JSTestRunner::pathToLocalResource (32 bytes) in com.apple.WebKit.WebContent running layout tests</short_desc>
          <delta_ts>2019-05-16 16:24:17 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</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>
          <dependson>42541</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Kilzer (:ddkilzer)">ddkilzer</reporter>
          <assigned_to name="David Kilzer (:ddkilzer)">ddkilzer</assigned_to>
          <cc>bburg</cc>
    
    <cc>cdumez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>darin</cc>
    
    <cc>joepeck</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1536932</commentid>
    <comment_count>0</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2019-05-16 15:29:37 -0700</bug_when>
    <thetext>Leak of OpaqueJSString under WTR::JSTestRunner::pathToLocalResource (32 bytes) in com.apple.WebKit.WebContent running layout tests.

STACK OF 1 INSTANCE OF &apos;ROOT LEAK: &lt;0x7fab7c32bf90&gt;&apos;:
[thread 0x10c0635c0]:
64  libdyld.dylib                      0x7fff633ad08d start + 1
63  com.apple.WebKit.WebContent           0x1078ad352 main + 34  XPCServiceMain.mm:165
62  com.apple.WebKit.WebContent           0x1078ad065 WebKit::XPCServiceMain(int, char const**) + 1333  XPCServiceMain.mm:157
61  libxpc.dylib                       0x7fff635e39e5 _xpc_copy_xpcservice_dictionary + 0
60  libxpc.dylib                       0x7fff635e3ee6 _xpc_objc_main + 555
59  com.apple.Foundation               0x7fff384b828f -[NSRunLoop(NSRunLoop) run] + 76
58  com.apple.Foundation               0x7fff384b83ba -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 280
57  com.apple.CoreFoundation           0x7fff36133be6 CFRunLoopRunSpecific + 467
56  com.apple.CoreFoundation           0x7fff36134303 __CFRunLoopRun + 1226
55  com.apple.CoreFoundation           0x7fff36134d5c __CFRunLoopDoSources0 + 195
54  com.apple.CoreFoundation           0x7fff36150eaf __CFRunLoopDoSource0 + 108
53  com.apple.CoreFoundation           0x7fff36150f09 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
52  com.apple.JavaScriptCore              0x5cea67174 WTF::RunLoop::performWork(void*) + 36  RunLoopCF.cpp:38
51  com.apple.JavaScriptCore              0x5cea667e3 WTF::RunLoop::performWork() + 211  RunLoop.cpp:107
50  com.apple.JavaScriptCore              0x5cea00dad WTF::Function&lt;void ()&gt;::operator()() const + 173  Function.h:56
49  com.apple.WebKit                      0x5b806d939 WTF::Function&lt;void ()&gt;::CallableWrapper&lt;IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr&lt;IPC::Decoder, std::__1::default_delete&lt;IPC::Decoder&gt; &gt;)::$_14&gt;::call() + 25  Function.h:101
48  com.apple.WebKit                      0x5b806da28 IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr&lt;IPC::Decoder, std::__1::default_delete&lt;IPC::Decoder&gt; &gt;)::$_14::operator()() + 104  Connection.cpp:957
47  com.apple.WebKit                      0x5b804ccb7 IPC::Connection::dispatchOneIncomingMessage() + 1607  Connection.cpp:1074
46  com.apple.WebKit                      0x5b803e2d1 IPC::Connection::dispatchMessage(std::__1::unique_ptr&lt;IPC::Decoder, std::__1::default_delete&lt;IPC::Decoder&gt; &gt;) + 721  Connection.cpp:0
45  com.apple.WebKit                      0x5b804beec IPC::Connection::dispatchMessage(IPC::Decoder&amp;) + 476  Connection.cpp:979
44  com.apple.WebKit                      0x5b8e69a46 WebKit::NetworkProcessConnection::didReceiveMessage(IPC::Connection&amp;, IPC::Decoder&amp;) + 166  NetworkProcessConnection.cpp:79
43  com.apple.WebKit                      0x5b9251456 WebKit::WebResourceLoader::didReceiveWebResourceLoaderMessage(IPC::Connection&amp;, IPC::Decoder&amp;) + 502  WebResourceLoaderMessageReceiver.cpp:61
42  com.apple.WebKit                      0x5b9251cf7 void IPC::handleMessage&lt;Messages::WebResourceLoader::DidReceiveData, WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(IPC::DataReference const&amp;, long long)&gt;(IPC::Decoder&amp;, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(IPC::DataReference const&amp;, long long)) + 343  HandleMessage.h:134
41  com.apple.WebKit                      0x5b92529b0 void IPC::callMemberFunction&lt;WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(IPC::DataReference const&amp;, long long), std::__1::tuple&lt;IPC::DataReference, long long&gt;, std::__1::integer_sequence&lt;unsigned long, 0ul, 1ul&gt; &gt;(std::__1::tuple&lt;IPC::DataReference, long long&gt;&amp;&amp;, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(IPC::DataReference const&amp;, long long)) + 96  HandleMessage.h:48
40  com.apple.WebKit                      0x5b9252a80 void IPC::callMemberFunctionImpl&lt;WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(IPC::DataReference const&amp;, long long), std::__1::tuple&lt;IPC::DataReference, long long&gt;, 0ul, 1ul&gt;(WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(IPC::DataReference const&amp;, long long), std::__1::tuple&lt;IPC::DataReference, long long&gt;&amp;&amp;, std::__1::integer_sequence&lt;unsigned long, 0ul, 1ul&gt;) + 192  HandleMessage.h:42
39  com.apple.WebKit                      0x5b8e7794e WebKit::WebResourceLoader::didReceiveData(IPC::DataReference const&amp;, long long) + 558  WebResourceLoader.cpp:145
38  com.apple.WebCore                     0x5c04ffad2 WebCore::SubresourceLoader::didReceiveData(char const*, unsigned int, long long, WebCore::DataPayloadType) + 98  SubresourceLoader.cpp:423
37  com.apple.WebCore                     0x5c04ffd92 WebCore::SubresourceLoader::didReceiveDataOrBuffer(char const*, int, WTF::RefPtr&lt;WebCore::SharedBuffer, WTF::DumbPtrTraits&lt;WebCore::SharedBuffer&gt; &gt;&amp;&amp;, long long, WebCore::DataPayloadType) + 674  SubresourceLoader.cpp:455
36  com.apple.WebCore                     0x5c0574ae9 WebCore::CachedRawResource::updateBuffer(WebCore::SharedBuffer&amp;) + 361  CachedRawResource.cpp:73
35  com.apple.WebCore                     0x5c0574d0b WebCore::CachedRawResource::notifyClientsDataWasReceived(char const*, unsigned int) + 155  CachedRawResource.cpp:135
34  com.apple.WebCore                     0x5c0433856 WebCore::DocumentLoader::dataReceived(WebCore::CachedResource&amp;, char const*, int) + 150  DocumentLoader.cpp:1102
33  com.apple.WebCore                     0x5c0432f35 WebCore::DocumentLoader::dataReceived(char const*, int) + 613  DocumentLoader.cpp:1129
32  com.apple.WebCore                     0x5c043300d WebCore::DocumentLoader::commitLoad(char const*, int) + 205  DocumentLoader.cpp:987
31  com.apple.WebKit                      0x5b8f5f1af WebKit::WebFrameLoaderClient::committedLoad(WebCore::DocumentLoader*, char const*, int) + 79  WebFrameLoaderClient.cpp:1035
30  com.apple.WebCore                     0x5c042dd96 WebCore::DocumentLoader::commitData(char const*, unsigned long) + 2630  DocumentLoader.cpp:0
29  com.apple.WebCore                     0x5c046d31b WebCore::DocumentWriter::addData(char const*, unsigned long) + 219  DocumentWriter.cpp:254
28  com.apple.WebCore                     0x5bfc88092 WebCore::DecodedDataDocumentParser::appendBytes(WebCore::DocumentWriter&amp;, char const*, unsigned long) + 162  DecodedDataDocumentParser.cpp:50
27  com.apple.WebCore                     0x5c01cc24a WebCore::HTMLDocumentParser::append(WTF::RefPtr&lt;WTF::StringImpl, WTF::DumbPtrTraits&lt;WTF::StringImpl&gt; &gt;&amp;&amp;) + 874  HTMLDocumentParser.cpp:418
26  com.apple.WebCore                     0x5c01c934d WebCore::HTMLDocumentParser::pumpTokenizerIfPossible(WebCore::HTMLDocumentParser::SynchronousMode) + 205  HTMLDocumentParser.cpp:186
25  com.apple.WebCore                     0x5c01c9a3e WebCore::HTMLDocumentParser::pumpTokenizer(WebCore::HTMLDocumentParser::SynchronousMode) + 526  HTMLDocumentParser.cpp:302
24  com.apple.WebCore                     0x5c01caf13 WebCore::HTMLDocumentParser::pumpTokenizerLoop(WebCore::HTMLDocumentParser::SynchronousMode, bool, WebCore::PumpSession&amp;) + 211  HTMLDocumentParser.cpp:254
23  com.apple.WebCore                     0x5c01ca95d WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder() + 1581  HTMLDocumentParser.cpp:233
22  com.apple.WebCore                     0x5c01ebf2f WebCore::HTMLScriptRunner::execute(WTF::Ref&lt;WebCore::ScriptElement, WTF::DumbPtrTraits&lt;WebCore::ScriptElement&gt; &gt;&amp;&amp;, WTF::TextPosition const&amp;) + 79  HTMLScriptRunner.cpp:142
21  com.apple.WebCore                     0x5c01ec104 WebCore::HTMLScriptRunner::runScript(WebCore::ScriptElement&amp;, WTF::TextPosition const&amp;) + 340  HTMLScriptRunner.cpp:252
20  com.apple.WebCore                     0x5bfe2eecd WebCore::ScriptElement::prepareScript(WTF::TextPosition const&amp;, WebCore::ScriptElement::LegacyTypeSupport) + 2589  ScriptElement.cpp:267
19  com.apple.WebCore                     0x5bfe30c5b WebCore::ScriptElement::executeClassicScript(WebCore::ScriptSourceCode const&amp;) + 891  ScriptElement.cpp:387
18  com.apple.WebCore                     0x5bf80b7bd WebCore::ScriptController::evaluate(WebCore::ScriptSourceCode const&amp;, WebCore::ExceptionDetails*) + 61  ScriptController.cpp:147
17  com.apple.WebCore                     0x5bf80b436 WebCore::ScriptController::evaluateInWorld(WebCore::ScriptSourceCode const&amp;, WebCore::DOMWrapperWorld&amp;, WebCore::ExceptionDetails*) + 310  ScriptController.cpp:131
16  com.apple.WebCore                     0x5bf80b6db WebCore::JSExecState::profiledEvaluate(JSC::ExecState*, JSC::ProfilingReason, JSC::SourceCode const&amp;, JSC::JSValue, WTF::NakedPtr&lt;JSC::Exception&gt;&amp;) + 75  JSExecState.h:80
15  com.apple.JavaScriptCore              0x5cfe08e71 JSC::profiledEvaluate(JSC::ExecState*, JSC::ProfilingReason, JSC::SourceCode const&amp;, JSC::JSValue, WTF::NakedPtr&lt;JSC::Exception&gt;&amp;) + 97  Completion.cpp:122
14  com.apple.JavaScriptCore              0x5cfe08cb5 JSC::evaluate(JSC::ExecState*, JSC::SourceCode const&amp;, JSC::JSValue, WTF::NakedPtr&lt;JSC::Exception&gt;&amp;) + 565  Completion.cpp:106
13  com.apple.JavaScriptCore              0x5cfb1081f JSC::Interpreter::executeProgram(JSC::SourceCode const&amp;, JSC::ExecState*, JSC::JSObject*) + 6255  Interpreter.cpp:832
12  com.apple.JavaScriptCore              0x5cfb1128e JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 206  JITCodeInlines.h:38
11  com.apple.JavaScriptCore              0x5ceebc0f2 vmEntryToJavaScript + 273  LowLevelInterpreter64.asm:295
10  com.apple.JavaScriptCore              0x5ceecf1eb llint_entry + 77442  LowLevelInterpreter.asm:899
9   com.apple.JavaScriptCore              0x5ceecf1eb llint_entry + 77442  LowLevelInterpreter.asm:899
8                                      0x43fb91a0102d 0x43fb91a01000 + 45
7   com.apple.JavaScriptCore              0x5cef536b1 long long JSC::APICallbackFunction::call&lt;JSC::JSCallbackFunction&gt;(JSC::ExecState*) + 577  APICallbackFunction.h:63
6   com.apple.WebKitTestRunner.InjectedBundle        0x5d62c49ed WTR::JSTestRunner::pathToLocalResource(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) + 109  JSTestRunner.cpp:1189
5   com.apple.JavaScriptCore              0x5cef77327 JSValueToStringCopy + 311  JSValueRef.cpp:437
4   com.apple.JavaScriptCore              0x5cef950fe OpaqueJSString::tryCreate(WTF::String&amp;&amp;) + 78  OpaqueJSString.cpp:50
3   com.apple.JavaScriptCore              0x5ce9e9ec5 WTF::ThreadSafeRefCountedBase::operator new(unsigned long) + 21  ThreadSafeRefCounted.h:37
2   com.apple.JavaScriptCore              0x5cea17dcc WTF::fastMalloc(unsigned long) + 124  FastMalloc.cpp:187
1   libsystem_malloc.dylib             0x7fff6355a783 malloc + 24
0   libsystem_malloc.dylib             0x7fff6355a82b malloc_zone_malloc + 139 
====
    1 (32 bytes) ROOT LEAK: 0x7fab7c32bf90 [32]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536933</commentid>
    <comment_count>1</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2019-05-16 15:30:00 -0700</bug_when>
    <thetext>&lt;rdar://problem/46731608&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536934</commentid>
    <comment_count>2</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2019-05-16 15:33:04 -0700</bug_when>
    <thetext>This regressed with the original commit:

Bug 42541: WebKitTestRunner needs layoutTestController.pathToLocalResource
&lt;https://bugs.webkit.org/show_bug.cgi?id=42541&gt;
&lt;https://trac.webkit.org/r84160&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536935</commentid>
    <comment_count>3</comment_count>
      <attachid>370076</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2019-05-16 15:35:20 -0700</bug_when>
    <thetext>Created attachment 370076
Patch v1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536944</commentid>
    <comment_count>4</comment_count>
      <attachid>370076</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2019-05-16 15:57:36 -0700</bug_when>
    <thetext>Comment on attachment 370076
Patch v1

Heh. r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536957</commentid>
    <comment_count>5</comment_count>
      <attachid>370076</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-05-16 16:24:16 -0700</bug_when>
    <thetext>Comment on attachment 370076
Patch v1

Clearing flags on attachment: 370076

Committed r245419: &lt;https://trac.webkit.org/changeset/245419&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536958</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-05-16 16:24:17 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>370076</attachid>
            <date>2019-05-16 15:35:20 -0700</date>
            <delta_ts>2019-05-16 16:24:16 -0700</delta_ts>
            <desc>Patch v1</desc>
            <filename>bug-197965-20190516153519.patch</filename>
            <type>text/plain</type>
            <size>1550</size>
            <attacher name="David Kilzer (:ddkilzer)">ddkilzer</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjQ1MzY2CmRpZmYgLS1naXQgYS9Ub29scy9DaGFuZ2VMb2cg
Yi9Ub29scy9DaGFuZ2VMb2cKaW5kZXggOTEyMDkzZjBmZmUzNDFjMmY0NmRhYTZhMGJlZWZlMmI5
N2MxMmJmMi4uZDk3ODYzYTBmODUxNWE1NmM2MDlhYmUzN2ZhNDIwMmM2OTgxYTNiYyAxMDA2NDQK
LS0tIGE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