<?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>222683</bug_id>
          
          <creation_ts>2021-03-03 13:30:31 -0800</creation_ts>
          <short_desc>Crash under SubresourceLoader::notifyDone()</short_desc>
          <delta_ts>2021-03-03 14:37:48 -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>Page Loading</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="Chris Dumez">cdumez</reporter>
          <assigned_to name="Chris Dumez">cdumez</assigned_to>
          <cc>achristensen</cc>
    
    <cc>beidson</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>ggaren</cc>
    
    <cc>japhet</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1735485</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2021-03-03 13:30:31 -0800</bug_when>
    <thetext>Crash under SubresourceLoader::notifyDone():
Thread[0] EXC_BAD_ACCESS (SIGSEGV) (KERN_INVALID_ADDRESS at 0x0000000000000038)
[  0] 0x00000001b09e068c WebCore`WebCore::SubresourceLoader::didCancel(WebCore::ResourceError const&amp;) [inlined] WTF::RawPtrTraits&lt;WebCore::CachedResourceLoader&gt;::unwrap(WebCore::CachedResourceLoader* const&amp;) at RawPtrTraits.h:43:69

     0x00000001b09e067c:      ldr w8, [x19, #0x628]
     0x00000001b09e0680:      cmp w8, #0x3             ; =0x3 
     0x00000001b09e0684:     cset w2, ne
     0x00000001b09e0688:      ldr x8, [x19, #0x28]
 -&gt;  0x00000001b09e068c:      ldr x0, [x8, #0x38]
     0x00000001b09e0690:      mov w1, #0x1
     0x00000001b09e0694:       bl 0x17698ec            ; WebCore::CachedResourceLoader::loadDone at CachedResourceLoader.cpp:1377
     0x00000001b09e0698:     ldrb w8, [x19, #0x3b8]
     0x00000001b09e069c:      cbz w8, 0x172c6ac        ; &lt;+204&gt; [inlined] WTF::RawPtrTraits&lt;WebCore::DocumentLoader&gt;::unwrap(WebCore::DocumentLoader* const&amp;) at RefPtr.h:83

[  0] 0x00000001b09e068c WebCore`WebCore::SubresourceLoader::didCancel(WebCore::ResourceError const&amp;) [inlined] WTF::Ref&lt;WebCore::CachedResourceLoader, WTF::RawPtrTraits&lt;WebCore::CachedResourceLoader&gt; &gt;::operator WebCore::CachedResourceLoader&amp;() const at Ref.h:118
[  0] 0x00000001b09e068c WebCore`WebCore::SubresourceLoader::didCancel(WebCore::ResourceError const&amp;) [inlined] WebCore::DocumentLoader::cachedResourceLoader() at DocumentLoader.h:181
       177 	
       178 	    const ResourceRequest&amp; request() const;
       179 	    ResourceRequest&amp; request();
       180 	
    -&gt; 181 	    CachedResourceLoader&amp; cachedResourceLoader() { return m_cachedResourceLoader; }
       182 	
       183 	    const SubstituteData&amp; substituteData() const { return m_substituteData; }
       184 	
       185 	    const URL&amp; url() const;
    
[  0] 0x00000001b09e068c WebCore`WebCore::SubresourceLoader::didCancel(WebCore::ResourceError const&amp;) [inlined] WebCore::SubresourceLoader::notifyDone(WebCore::LoadCompletionType) + 84 at SubresourceLoader.cpp:845
       841 	#if PLATFORM(IOS_FAMILY)
       842 	    if (m_state == CancelledWhileInitializing)
       843 	        shouldPerformPostLoadActions = false;
       844 	#endif
    -&gt; 845 	    m_documentLoader-&gt;cachedResourceLoader().loadDone(type, shouldPerformPostLoadActions);
       846 	    if (reachedTerminalState())
       847 	        return;
       848 	    m_documentLoader-&gt;removeSubresourceLoader(type, this);
       849 	}
    
[  0] 0x00000001b09e0638 WebCore`WebCore::SubresourceLoader::didCancel(WebCore::ResourceError const&amp;) + 88 at SubresourceLoader.cpp:831
       827 	    if (m_resource-&gt;type() != CachedResource::Type::MainResource)
       828 	        tracePoint(SubresourceLoadDidEnd);
       829 	
       830 	    m_resource-&gt;cancelLoad();
    -&gt; 831 	    notifyDone(LoadCompletionType::Cancel);
       832 	}
       833 	
       834 	void SubresourceLoader::notifyDone(LoadCompletionType type)
       835 	{
    
[  1] 0x00000001b09e0637 WebCore`WebCore::SubresourceLoader::didCancel(WebCore::ResourceError const&amp;) + 87 at SubresourceLoader.cpp:830:17
       826 	
       827 	    if (m_resource-&gt;type() != CachedResource::Type::MainResource)
       828 	        tracePoint(SubresourceLoadDidEnd);
       829 	
    -&gt; 830 	    m_resource-&gt;cancelLoad();
       831 	    notifyDone(LoadCompletionType::Cancel);
       832 	}
       833 	
       834 	void SubresourceLoader::notifyDone(LoadCompletionType type)
    
[  2] 0x00000001b09d3707 WebCore`WebCore::ResourceLoader::cancel(WebCore::ResourceError const&amp;) + 579 at ResourceLoader.cpp:654:5
       650 	    // we don&apos;t want to redo didCancel() or releasesResources().
       651 	    if (m_reachedTerminalState)
       652 	        return;
       653 	
    -&gt; 654 	    didCancel(nonNullError);
       655 	
       656 	    if (m_cancellationStatus == FinishedCancel)
       657 	        return;
       658 	    m_cancellationStatus = FinishedCancel;
    
[  3] 0x00000001b09d0d9b WebCore`WebCore::ResourceLoader::cancel() + 71 at ResourceLoader.cpp:609:5
[  4] 0x00000001b09d0a43 WebCore`WebCore::ResourceLoader::init(WebCore::ResourceRequest&amp;&amp;, WTF::CompletionHandler&lt;void (bool)&gt;&amp;&amp;) + 147 at ResourceLoader.cpp:127:9
[  5] 0x00000001b09db71b WebCore`WebCore::SubresourceLoader::create(WebCore::Frame&amp;, WebCore::CachedResource&amp;, WebCore::ResourceRequest&amp;&amp;, WebCore::ResourceLoaderOptions const&amp;, WTF::CompletionHandler&lt;void (WTF::RefPtr&lt;WebCore::SubresourceLoader, WTF::RawPtrTraits&lt;WebCore::SubresourceLoader&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::SubresourceLoader&gt; &gt;&amp;&amp;)&gt;&amp;&amp;) [inlined] WebCore::SubresourceLoader::init(WebCore::ResourceRequest&amp;&amp;, WTF::CompletionHandler&lt;void (bool)&gt;&amp;&amp;) + 63 at SubresourceLoader.cpp:165:21</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1735487</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2021-03-03 13:30:42 -0800</bug_when>
    <thetext>&lt;rdar://70342402&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1735488</commentid>
    <comment_count>2</comment_count>
      <attachid>422144</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2021-03-03 13:32:38 -0800</bug_when>
    <thetext>Created attachment 422144
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1735491</commentid>
    <comment_count>3</comment_count>
      <attachid>422144</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2021-03-03 13:38:25 -0800</bug_when>
    <thetext>Comment on attachment 422144
Patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1735528</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2021-03-03 14:37:46 -0800</bug_when>
    <thetext>Committed r273842: &lt;https://commits.webkit.org/r273842&gt;

All reviewed patches have been landed. Closing bug and clearing flags on attachment 422144.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>422144</attachid>
            <date>2021-03-03 13:32:38 -0800</date>
            <delta_ts>2021-03-03 14:37:47 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-222683-20210303133237.patch</filename>
            <type>text/plain</type>
            <size>1941</size>
            <attacher name="Chris Dumez">cdumez</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjczODM0CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggNWY1NjQ2ZjBhNmNiOGU3
MjIzY2QwNDY0MmUxYzEyY2ZlMDEzNjNkNS4uMzFlM2NlMjc0ZDRiNGJhZGI1MjNhYzNmMTEyNTY3
YjhhOWE2YWE0MyAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDIwIEBACisyMDIxLTAzLTAzICBDaHJp
cyBEdW1leiAgPGNkdW1lekBhcHBsZS5jb20+CisKKyAgICAgICAgQ3Jhc2ggdW5kZXIgU3VicmVz
b3VyY2VMb2FkZXI6Om5vdGlmeURvbmUoKQorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9y
Zy9zaG93X2J1Zy5jZ2k/aWQ9MjIyNjgzCisgICAgICAgIDxyZGFyOi8vNzAzNDI0MDI+CisKKyAg
ICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgV2Ugd2VyZSBjcmFz
aGluZyBkb2luZyBhIG51bGwtZGVyZWZlcmVuY2Ugb2YgbV9kb2N1bWVudExvYWRlciB1bmRlcgor
ICAgICAgICBTdWJyZXNvdXJjZUxvYWRlcjo6bm90aWZ5RG9uZSgpLiBUaGlzIGFkZHMgbnVsbCBj
aGVja3MgZm9yIG1fZG9jdW1lbnRMb2FkZXIKKyAgICAgICAgc2ltaWxhcmx5I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