<?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>109225</bug_id>
          
          <creation_ts>2013-02-07 13:23:35 -0800</creation_ts>
          <short_desc>[Gtk] WebKit2 crashes when loading pages with http 304 code.</short_desc>
          <delta_ts>2013-02-08 07:40:51 -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>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>109287</dup_id>
          
          <bug_file_loc>http://renevier.net/misc/webkit_109225.php</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="arno.">a.renevier</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cgarcia</cc>
    
    <cc>gustavo</cc>
    
    <cc>mrobinson</cc>
    
    <cc>svillar</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>827848</commentid>
    <comment_count>0</comment_count>
    <who name="arno.">a.renevier</who>
    <bug_when>2013-02-07 13:23:35 -0800</bug_when>
    <thetext>Hi, when loading a page with a 304 code from cache, MiniBrowser crashes.
This happens because in that case, receiveData happens before receiveResponse.
Then, in that case, setCertificateToMainResource is called before a response has been set to the webresource. So, webkitURIResponseSetCertificateInfo(webkit_web_resource_get_response(priv-&gt;mainResource.get()), results in a null parameter being used in webkitURIResponseSetCertificateInfo).

Here is the crash backtrace:

#0  0xb6918bd9 in webkitURIResponseSetCertificateInfo(_WebKitURIResponse*, WebKit::WebCertificateInfo*) ()
   from /home/arno/webkit/WebKit.upstream/WebKitBuild/Release/.libs/libwebkit2gtk-3.0.so.0
#1  0xb6922c45 in setCertificateToMainResource(_WebKitWebView*) () from /home/arno/webkit/WebKit.upstream/WebKitBuild/Release/.libs/libwebkit2gtk-3.0.so.0
#2  0xb6928dcd in webkitWebViewLoadChanged(_WebKitWebView*, WebKitLoadEvent) () from /home/arno/webkit/WebKit.upstream/WebKitBuild/Release/.libs/libwebkit2gtk-3.0.so.0
#3  0xb690a34b in didCommitLoadForFrame(OpaqueWKPage const*, OpaqueWKFrame const*, void const*, void const*) ()
   from /home/arno/webkit/WebKit.upstream/WebKitBuild/Release/.libs/libwebkit2gtk-3.0.so.0
#4  0xb6978912 in WebKit::WebLoaderClient::didCommitLoadForFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::APIObject*) ()
   from /home/arno/webkit/WebKit.upstream/WebKitBuild/Release/.libs/libwebkit2gtk-3.0.so.0
#5  0xb698c20e in WebKit::WebPageProxy::didCommitLoadForFrame(unsigned long long, WTF::String const&amp;, bool, unsigned int, WebKit::PlatformCertificateInfo const&amp;, CoreIPC::MessageDecoder&amp;) () from /home/arno/webkit/WebKit.upstream/WebKitBuild/Release/.libs/libwebkit2gtk-3.0.so.0
#6  0xb6a4aeb8 in void CoreIPC::handleMessageVariadic&lt;Messages::WebPageProxy::DidCommitLoadForFrame, WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(unsigned long long, WTF::String const&amp;, bool, unsigned int, WebKit::PlatformCertificateInfo const&amp;, CoreIPC::MessageDecoder&amp;)&gt;(CoreIPC::MessageDecoder&amp;, WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(unsigned long long, WTF::String const&amp;, bool, unsigned int, WebKit::PlatformCertificateInfo const&amp;, CoreIPC::MessageDecoder&amp;)) ()
   from /home/arno/webkit/WebKit.upstream/WebKitBuild/Release/.libs/libwebkit2gtk-3.0.so.0
#7  0xb6a4a458 in WebKit::WebPageProxy::didReceiveWebPageProxyMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&amp;) ()
   from /home/arno/webkit/WebKit.upstream/WebKitBuild/Release/.libs/libwebkit2gtk-3.0.so.0
#8  0xb69850a7 in WebKit::WebPageProxy::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&amp;) ()
   from /home/arno/webkit/WebKit.upstream/WebKitBuild/Release/.libs/libwebkit2gtk-3.0.so.0
#9  0xb69a230c in WebKit::WebProcessProxy::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&amp;) ()
   from /home/arno/webkit/WebKit.upstream/WebKitBuild/Release/.libs/libwebkit2gtk-3.0.so.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>827851</commentid>
    <comment_count>1</comment_count>
    <who name="arno.">a.renevier</who>
    <bug_when>2013-02-07 13:25:00 -0800</bug_when>
    <thetext>loading the above url twice in a row will crash MiniBrowser.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>827852</commentid>
    <comment_count>2</comment_count>
      <attachid>187164</attachid>
    <who name="arno.">a.renevier</who>
    <bug_when>2013-02-07 13:25:19 -0800</bug_when>
    <thetext>Created attachment 187164
crashtest source</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>828561</commentid>
    <comment_count>3</comment_count>
    <who name="Sergio Villar Senin">svillar</who>
    <bug_when>2013-02-08 07:40:51 -0800</bug_when>
    <thetext>Although this was reported first, I&apos;m setting this as dup of the other because there is a patch available

*** This bug has been marked as a duplicate of bug 109287 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>187164</attachid>
            <date>2013-02-07 13:25:19 -0800</date>
            <delta_ts>2013-02-07 13:25:19 -0800</delta_ts>
            <desc>crashtest source</desc>
            <filename>crash.php</filename>
            <type>application/x-php</type>
            <size>245</size>
            <attacher name="arno.">a.renevier</attacher>
            
              <data encoding="base64">PD9waHAKJGNvbnRlbnQgPSAiPGh0bWw+aGVsbG8gd29ybGQ8L2h0bWw+IjsKJG1kNSA9IG1kNSgk
Y29udGVudCk7CmlmICgkX1NFUlZFUlsiSFRUUF9JRl9OT05FX01BVENIIl0gPT0gJG1kNSkgewog
ICAgaGVhZGVyKCRfU0VSVkVSWydTRVJWRVJfUFJPVE9DT0wnXS4nIDMwNCBOb3QgTW9kaWZpZWQn
LCB0cnVlLCAzMDQpOwp9IGVsc2UgewogICAgaGVhZGVyKCJFVGFnOiAkbWQ1Iik7CiAgICBwcmlu
dCAkY29udGVudDsKfQo/Pgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>