<?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>225801</bug_id>
          
          <creation_ts>2021-05-13 23:40:17 -0700</creation_ts>
          <short_desc>[WinCairo][PlayStation] ASSERT(data) fails in DocumentLoader::dataReceived on http/wpt/misc/last-modified-parsing.html</short_desc>
          <delta_ts>2021-10-31 12:29:26 -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>Frames</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=232448</see_also>
          <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="Fujii Hironori">fujii</reporter>
          <assigned_to name="Fujii Hironori">fujii</assigned_to>
          <cc>achristensen</cc>
    
    <cc>ap</cc>
    
    <cc>cdumez</cc>
    
    <cc>cgambrell</cc>
    
    <cc>jbedard</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1760020</commentid>
    <comment_count>0</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2021-05-13 23:40:17 -0700</bug_when>
    <thetext>ASSERT(data) fails in DocumentLoader::dataReceived

WinCairo Debug r277448.

1. Invoke &quot;python.exe .\Tools\Scripts\run-webkit-httpd&quot; as Admin
2. Start WinCairo Debug MiniBrowser
   .\WebKitBuild\Debug\bin64\MiniBrowser.exe
3. Open http://localhost:8800/WebKit/misc/last-modified-parsing.html
4. Reload
5. Crash

Callstack:

WTF.dll!WTFCrash() Line 305	C++
WebKit2.dll!WTFCrashWithInfo(int __formal, const char * __formal, const char * __formal, int __formal) Line 696	C++
WebKit2.dll!WebCore::DocumentLoader::dataReceived(const char * data, int length) Line 1260	C++
WebKit2.dll!WebCore::DocumentLoader::dataReceived(WebCore::CachedResource &amp; resource, const char * data, int length) Line 1251	C++
WebKit2.dll!WebCore::CachedRawResource::didAddClient::__l2::void &lt;lambda&gt;(WebCore::ResourceRequest &amp;&amp;)::__l2::&lt;lambda&gt;() Line 172	C++
WebKit2.dll!WTF::Detail::CallableWrapper&lt;void &lt;lambda&gt;(void),void&gt;::call() Line 52	C++
WebKit2.dll!WTF::Function&lt;void __cdecl(void)&gt;::operator()() Line 84	C++
WebKit2.dll!WTF::CompletionHandler&lt;void __cdecl(void)&gt;::operator()() Line 67	C++
WebKit2.dll!WebCore::DocumentLoader::responseReceived::__l2::&lt;lambda&gt;(WebCore::PolicyAction policy, WebCore::PolicyCheckIdentifier responseIdentifier) Line 951	C++
WebKit2.dll!WTF::Detail::CallableWrapper&lt;void &lt;lambda&gt;(WebCore::PolicyAction, WebCore::PolicyCheckIdentifier),void,enum WebCore::PolicyAction,WebCore::PolicyCheckIdentifier&gt;::call(WebCore::PolicyAction &lt;in_0&gt;, WebCore::PolicyCheckIdentifier &lt;in_1&gt;) Line 52	C++
WebKit2.dll!WTF::Function&lt;void __cdecl(enum WebCore::PolicyAction,WebCore::PolicyCheckIdentifier)&gt;::operator()(WebCore::PolicyAction &lt;in_0&gt;, WebCore::PolicyCheckIdentifier &lt;in_1&gt;) Line 84	C++
WebKit2.dll!WebKit::WebFrame::didReceivePolicyDecision(unsigned __int64 listenerID, WebKit::PolicyDecision &amp;&amp; policyDecision) Line 288	C++
WebKit2.dll!WebKit::WebPage::didReceivePolicyDecision(WTF::ObjectIdentifier&lt;enum WebCore::FrameIdentifierType&gt; frameID, unsigned __int64 listenerID, WebKit::PolicyDecision &amp;&amp; policyDecision, const WebKit::SandboxExtension::HandleArray &amp; networkExtensionsHandles) Line 3499	C++
WebKit2.dll!IPC::callMemberFunctionImpl&lt;WebKit::WebPage,void (__cdecl WebKit::WebPage::*)(WTF::ObjectIdentifier&lt;enum WebCore::FrameIdentifierType&gt;,unsigned __int64,WebKit::PolicyDecision &amp;&amp;,WebKit::SandboxExtension::HandleArray const &amp;),std::tuple&lt;WTF::ObjectIdentifier&lt;enum WebCore::FrameIdentifierType&gt;,unsigned __int64,WebKit::PolicyDecision,WebKit::SandboxExtension::HandleArray&gt;,0,1,2,3&gt;(WebKit::WebPage * object, void(WebKit::WebPage::*)(WTF::ObjectIdentifier&lt;enum WebCore::FrameIdentifierType&gt;, unsigned __int64, WebKit::PolicyDecision &amp;&amp;, const WebKit::SandboxExtension::HandleArray &amp;) function, std::tuple&lt;WTF::ObjectIdentifier&lt;enum WebCore::FrameIdentifierType&gt;,unsigned __int64,WebKit::PolicyDecision,WebKit::SandboxExtension::HandleArray&gt; &amp;&amp; args, std::integer_sequence&lt;unsigned __int64,0,1,2,3&gt; __formal) Line 44	C++
WebKit2.dll!IPC::callMemberFunction&lt;WebKit::WebPage,void (__cdecl WebKit::WebPage::*)(WTF::ObjectIdentifier&lt;enum WebCore::FrameIdentifierType&gt;,unsigned __int64,WebKit::PolicyDecision &amp;&amp;,WebKit::SandboxExtension::HandleArray const &amp;),std::tuple&lt;WTF::ObjectIdentifier&lt;enum WebCore::FrameIdentifierType&gt;,unsigned __int64,WebKit::PolicyDecision,WebKit::SandboxExtension::HandleArray&gt;,std::integer_sequence&lt;unsigned __int64,0,1,2,3&gt;&gt;(std::tuple&lt;WTF::ObjectIdentifier&lt;enum WebCore::FrameIdentifierType&gt;,unsigned __int64,WebKit::PolicyDecision,WebKit::SandboxExtension::HandleArray&gt; &amp;&amp; args, WebKit::WebPage * object, void(WebKit::WebPage::*)(WTF::ObjectIdentifier&lt;enum WebCore::FrameIdentifierType&gt;, unsigned __int64, WebKit::PolicyDecision &amp;&amp;, const WebKit::SandboxExtension::HandleArray &amp;) function) Line 50	C++
WebKit2.dll!IPC::handleMessage&lt;Messages::WebPage::DidReceivePolicyDecision,WebKit::WebPage,void (__cdecl WebKit::WebPage::*)(WTF::ObjectIdentifier&lt;enum WebCore::FrameIdentifierType&gt;,unsigned __int64,WebKit::PolicyDecision &amp;&amp;,WebKit::SandboxExtension::HandleArray const &amp;)&gt;(IPC::Decoder &amp; decoder, WebKit::WebPage * object, void(WebKit::WebPage::*)(WTF::ObjectIdentifier&lt;enum WebCore::FrameIdentifierType&gt;, unsigned __int64, WebKit::PolicyDecision &amp;&amp;, const WebKit::SandboxExtension::HandleArray &amp;) function) Line 120	C++
WebKit2.dll!WebKit::WebPage::didReceiveWebPageMessage(IPC::Connection &amp; connection, IPC::Decoder &amp; decoder) Line 3284	C++
WebKit2.dll!WebKit::WebPage::didReceiveMessage(IPC::Connection &amp; connection, IPC::Decoder &amp; decoder) Line 4946	C++
WebKit2.dll!IPC::MessageReceiverMap::dispatchMessage(IPC::Connection &amp; connection, IPC::Decoder &amp; decoder) Line 130	C++
WebKit2.dll!WebKit::WebProcess::didReceiveMessage(IPC::Connection &amp; connection, IPC::Decoder &amp; decoder) Line 852	C++
WebKit2.dll!IPC::Connection::dispatchMessage(IPC::Decoder &amp; decoder) Line 1052	C++
WebKit2.dll!IPC::Connection::dispatchMessage(std::unique_ptr&lt;IPC::Decoder,std::default_delete&lt;IPC::Decoder&gt;&gt; message) Line 1098	C++
WebKit2.dll!IPC::Connection::dispatchOneIncomingMessage() Line 1166	C++
WebKit2.dll!IPC::Connection::enqueueIncomingMessage::__l2::&lt;lambda&gt;() Line 1021	C++
WebKit2.dll!WTF::Detail::CallableWrapper&lt;void &lt;lambda&gt;(void),void&gt;::call() Line 52	C++
WTF.dll!WTF::Function&lt;void __cdecl(void)&gt;::operator()() Line 84	C++
WTF.dll!WTF::RunLoop::performWork() Line 134	C++
WTF.dll!WTF::RunLoop::wndProc(HWND__ * hWnd, unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 57	C++
WTF.dll!WTF::RunLoop::RunLoopWndProc(HWND__ * hWnd, unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 39	C++
[External Code]	
WTF.dll!WTF::RunLoop::run() Line 74	C++
WebKit2.dll!WebKit::AuxiliaryProcessMainBase&lt;WebKit::WebProcess,1&gt;::run(int argc, char * * argv) Line 71	C++
WebKit2.dll!WebKit::AuxiliaryProcessMain&lt;WebKit::WebProcessMainWin&gt;(int argc, char * * argv) Line 97	C++
WebKit2.dll!WebKit::WebProcessMain(int argc, char * * argv) Line 58	C++
WebKitWebProcess.exe!main(int argc, char * * argv) Line 35	C++
[External Code]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1760871</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2021-05-17 13:59:09 -0700</bug_when>
    <thetext>While this is obviously hitting a bug (probably in the WinCairo port), the issue was probably unnecessarily triggered by a rewrite of this test, and can be worked around in some way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1760890</commentid>
    <comment_count>2</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2021-05-17 14:30:11 -0700</bug_when>
    <thetext>(In reply to Alexey Proskuryakov from comment #1)
&gt; While this is obviously hitting a bug (probably in the WinCairo port), the
&gt; issue was probably unnecessarily triggered by a rewrite of this test, and
&gt; can be worked around in some way.

No, http/wpt/misc/last-modified-parsing.html doesn&apos;t trigger this assertion failure. You need to manually reloading the test content to reproduce it.
I found this assertion failure while debugging http/wpt/misc/last-modified-parsing.html test failure of Windows ports (Bug 209455).

r277408 updated AppleWin&apos;s TestExpectations, but WinCairo&apos;s.
That was the reason I noticed and looked into the test failure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1762308</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-05-20 23:41:16 -0700</bug_when>
    <thetext>&lt;rdar://problem/78297185&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1769540</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2021-06-14 14:06:45 -0700</bug_when>
    <thetext>Doesn&apos;t reproduce on macOS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1769651</commentid>
    <comment_count>5</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2021-06-14 17:46:48 -0700</bug_when>
    <thetext>Thank you for the checking.

WebResourceLoader::didReceiveResource checks data size is not zero, but WebResourceLoader::didReceiveData doesn&apos;t.
https://github.com/WebKit/WebKit/blob/448d79ba91dea24fa503667995b4189733898f07/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp#L313,L314

WinCairo and PlayStation ports seem the only port disabling ENABLE_SHAREABLE_RESOURCE.
They should consider enabling it.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>