<?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>19556</bug_id>
          
          <creation_ts>2008-06-15 07:44:43 -0700</creation_ts>
          <short_desc>REGRESSION (r34544): Crash while visiting bigglook.com</short_desc>
          <delta_ts>2008-06-15 15:11:40 -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>Page Loading</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Regression</keywords>
          <priority>P1</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ismail Donmez">ismail</reporter>
          <assigned_to name="Darin Adler">darin</assigned_to>
          <cc>beidson</cc>
    
    <cc>darin</cc>
    
    <cc>mitz</cc>
    
    <cc>zwarich</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>83372</commentid>
    <comment_count>0</comment_count>
    <who name="Ismail Donmez">ismail</who>
    <bug_when>2008-06-15 07:44:43 -0700</bug_when>
    <thetext>Visit http://bigglook.com with latest trunk and Safari crashes, I got multiple backtraces:

Thread 0 Crashed:
0   com.apple.WebCore             	0x0108199b WTF::HashTable&lt;WebCore::String, WebCore::String, WTF::IdentityExtractor&lt;WebCore::String&gt;, WebCore::StringHash, WTF::HashTraits&lt;WebCore::String&gt;, WTF::HashTraits&lt;WebCore::String&gt; &gt;::rehash(int) + 107 (PlatformString.h:225)
1   com.apple.WebCore             	0x01081ccd WTF::HashTable&lt;WebCore::String, WebCore::String, WTF::IdentityExtractor&lt;WebCore::String&gt;, WebCore::StringHash, WTF::HashTraits&lt;WebCore::String&gt;, WTF::HashTraits&lt;WebCore::String&gt; &gt;::expand() + 45 (HashTable.h:874)
2   com.apple.WebCore             	0x0108206b std::pair&lt;WTF::HashTableIterator&lt;WebCore::String, WebCore::String, WTF::IdentityExtractor&lt;WebCore::String&gt;, WebCore::StringHash, WTF::HashTraits&lt;WebCore::String&gt;, WTF::HashTraits&lt;WebCore::String&gt; &gt;, bool&gt; WTF::HashTable&lt;WebCore::String, WebCore::String, WTF::IdentityExtractor&lt;WebCore::String&gt;, WebCore::StringHash, WTF::HashTraits&lt;WebCore::String&gt;, WTF::HashTraits&lt;WebCore::String&gt; &gt;::add&lt;WebCore::String, WebCore::String, WTF::IdentityHashTranslator&lt;WebCore::String, WebCore::String, WebCore::StringHash&gt; &gt;(WebCore::String const&amp;, WebCore::String const&amp;) + 875
3   com.apple.WebCore             	0x010820c7 WTF::HashSet&lt;WebCore::String, WebCore::StringHash, WTF::HashTraits&lt;WebCore::String&gt; &gt;::add(WebCore::String const&amp;) + 39 (HashTable.h:1095)
4   com.apple.WebCore             	0x013855c3 WebCore::PageURLRecord::setIconRecord(WTF::PassRefPtr&lt;WebCore::IconRecord&gt;) + 163 (PageURLRecord.cpp:55)
5   com.apple.WebCore             	0x01222b9f WebCore::IconDatabase::setIconURLForPageURL(WebCore::String const&amp;, WebCore::String const&amp;) + 415 (PassRefPtr.h:44)
6   com.apple.WebCore             	0x0118fcdc WebCore::FrameLoader::commitIconURLToIconDatabase(WebCore::KURL const&amp;) + 44 (FrameLoader.cpp:1183)
7   com.apple.WebCore             	0x0122c071 WebCore::IconLoader::finishLoading(WebCore::KURL const&amp;, WTF::PassRefPtr&lt;WebCore::SharedBuffer&gt;) + 145 (IconLoader.cpp:159)
8   com.apple.WebCore             	0x0122c948 WebCore::IconLoader::didReceiveResponse(WebCore::SubresourceLoader*, WebCore::ResourceResponse const&amp;) + 184 (RefPtr.h:51)
9   com.apple.WebCore             	0x0152dbdf WebCore::SubresourceLoader::didReceiveResponse(WebCore::ResourceResponse const&amp;) + 95 (SubresourceLoader.cpp:150)
10  com.apple.WebCore             	0x01437cab -[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:] + 267 (RetainPtr.h:72)
11  com.apple.Foundation          	0x9394481a -[NSURLConnection(NSURLConnectionReallyInternal) sendDidReceiveResponse:] + 122
12  com.apple.Foundation          	0x9394476a _NSURLConnectionDidReceiveResponse + 154
13  com.apple.CFNetwork           	0x92633703 sendDidReceiveDataCallback + 350
14  com.apple.CFNetwork           	0x92630cee _CFURLConnectionSendCallbacks + 1586
15  com.apple.CFNetwork           	0x9263063f muxerSourcePerform + 283
16  com.apple.CoreFoundation      	0x9047460e CFRunLoopRunSpecific + 3166
17  com.apple.CoreFoundation      	0x90474cf8 CFRunLoopRunInMode + 88
18  com.apple.HIToolbox           	0x93b92da4 RunCurrentEventLoopInMode + 283
19  com.apple.HIToolbox           	0x93b92bbd ReceiveNextEventCommon + 374
20  com.apple.HIToolbox           	0x93b92a31 BlockUntilNextEventMatchingListInMode + 106
21  com.apple.AppKit              	0x92c61505 _DPSNextEvent + 657
22  com.apple.AppKit              	0x92c60db8 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
23  com.apple.Safari              	0x00007c7e 0x1000 + 27774
24  com.apple.AppKit              	0x92c59df3 -[NSApplication run] + 795
25  com.apple.AppKit              	0x92c27030 NSApplicationMain + 574
26  com.apple.Safari              	0x000b4de6 0x1000 + 736742


And the other one :

Thread 0 Crashed:
0   ???                           	0000000000 0 + 0
1   com.apple.WebKit              	0x00215acb -[WebView(WebViewInternal) _dispatchDidReceiveIconFromWebFrame:] + 187 (WebView.mm:4330)
2   com.apple.WebKit              	0x001bd759 WebFrameLoaderClient::dispatchDidReceiveIcon() + 57 (WebFrameLoaderClient.mm:473)
3   com.apple.WebCore             	0x0122c08f WebCore::IconLoader::finishLoading(WebCore::KURL const&amp;, WTF::PassRefPtr&lt;WebCore::SharedBuffer&gt;) + 175 (IconLoader.cpp:162)
4   com.apple.WebCore             	0x0122c948 WebCore::IconLoader::didReceiveResponse(WebCore::SubresourceLoader*, WebCore::ResourceResponse const&amp;) + 184 (RefPtr.h:51)
5   com.apple.WebCore             	0x0152dbdf WebCore::SubresourceLoader::didReceiveResponse(WebCore::ResourceResponse const&amp;) + 95 (SubresourceLoader.cpp:150)
6   com.apple.WebCore             	0x01437cab -[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:] + 267 (RetainPtr.h:72)
7   com.apple.Foundation          	0x9394481a -[NSURLConnection(NSURLConnectionReallyInternal) sendDidReceiveResponse:] + 122
8   com.apple.Foundation          	0x9394476a _NSURLConnectionDidReceiveResponse + 154
9   com.apple.CFNetwork           	0x92633703 sendDidReceiveDataCallback + 350
10  com.apple.CFNetwork           	0x92630cee _CFURLConnectionSendCallbacks + 1586
11  com.apple.CFNetwork           	0x9263063f muxerSourcePerform + 283
12  com.apple.CoreFoundation      	0x9047460e CFRunLoopRunSpecific + 3166
13  com.apple.CoreFoundation      	0x90474cf8 CFRunLoopRunInMode + 88
14  com.apple.HIToolbox           	0x93b92da4 RunCurrentEventLoopInMode + 283
15  com.apple.HIToolbox           	0x93b92bbd ReceiveNextEventCommon + 374
16  com.apple.HIToolbox           	0x93b92a31 BlockUntilNextEventMatchingListInMode + 106
17  com.apple.AppKit              	0x92c61505 _DPSNextEvent + 657
18  com.apple.AppKit              	0x92c60db8 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
19  com.apple.Safari              	0x00007c7e 0x1000 + 27774
20  com.apple.AppKit              	0x92c59df3 -[NSApplication run] + 795
21  com.apple.AppKit              	0x92c27030 NSApplicationMain + 574
22  com.apple.Safari              	0x000b4de6 0x1000 + 736742</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83387</commentid>
    <comment_count>1</comment_count>
    <who name="">mitz</who>
    <bug_when>2008-06-15 11:14:55 -0700</bug_when>
    <thetext>This is caused by over-releasing the IconRecord in the &quot;create&quot; case of IconDatabase::getOrCreateIconRecord().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83393</commentid>
    <comment_count>2</comment_count>
    <who name="">mitz</who>
    <bug_when>2008-06-15 12:31:40 -0700</bug_when>
    <thetext>Prior to r34544, the code relied on the ability of m_iconURLToRecordMap to keep weak references to newly-created IconRecords with a 0 reference count. I don&apos;t think it&apos;s possible to just change m_iconURLToRecordMap to use strong references, because of the hasOneRef() checks in other places in the code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83394</commentid>
    <comment_count>3</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2008-06-15 12:33:31 -0700</bug_when>
    <thetext>Damn! I wonder what should we do about this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83399</commentid>
    <comment_count>4</comment_count>
    <who name="Cameron Zwarich (cpst)">zwarich</who>
    <bug_when>2008-06-15 12:52:23 -0700</bug_when>
    <thetext>*** Bug 19563 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83404</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2008-06-15 14:37:38 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Prior to r34544, the code relied on the ability of m_iconURLToRecordMap to keep
&gt; weak references to newly-created IconRecords with a 0 reference count. I don&apos;t
&gt; think it&apos;s possible to just change m_iconURLToRecordMap to use strong
&gt; references, because of the hasOneRef() checks in other places in the code.

I think we can fix this without changing the map so it can keep strong references, as long as nobody is relying on the IconRecord being kept alive indefinitely with a 0 reference count. I need to figure out more precisely what&apos;s going wrong.

I&apos;ve set aside my other work so I can concentrate on this now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83406</commentid>
    <comment_count>6</comment_count>
      <attachid>21718</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2008-06-15 15:04:03 -0700</bug_when>
    <thetext>Created attachment 21718
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83407</commentid>
    <comment_count>7</comment_count>
      <attachid>21718</attachid>
    <who name="">mitz</who>
    <bug_when>2008-06-15 15:05:34 -0700</bug_when>
    <thetext>Comment on attachment 21718
patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83408</commentid>
    <comment_count>8</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2008-06-15 15:11:40 -0700</bug_when>
    <thetext>Committed revision 34575.
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>21718</attachid>
            <date>2008-06-15 15:04:03 -0700</date>
            <delta_ts>2008-06-15 15:05:34 -0700</delta_ts>
            <desc>patch</desc>
            <filename>IconCrashPatch.txt</filename>
            <type>text/plain</type>
            <size>3161</size>
            <attacher name="Darin Adler">darin</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiAzNDU3NCkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMjAgQEAKKzIwMDgtMDYtMTUgIERhcmluIEFkbGVyICA8ZGFyaW5AYXBwbGUuY29t
PgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIC0gZml4
IGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xOTU1NgorICAgICAgICAg
IFJFR1JFU1NJT04gKHIzNDU0NCk6IENyYXNoIHdoaWxlIHZpc2l0aW5nIGJpZ2dsb29rLmNvbQor
CisgICAgICAgIFRoaXM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2ldLnBhZ2VVUkwpOwotICAgICAgICBlbHNlIHsKKyAgICAgICAgZWxz
ZQogICAgICAgICAgICAgc2V0SWNvblVSTEZvclBhZ2VVUkxJblNRTERhdGFiYXNlKHBhZ2VTbmFw
c2hvdHNbaV0uaWNvblVSTCwgcGFnZVNuYXBzaG90c1tpXS5wYWdlVVJMKTsKLSAgICAgICAgfQog
ICAgICAgICBMT0coSWNvbkRhdGFiYXNlLCAiQ29tbWl0dGVkIEljb25VUkwgZm9yIFBhZ2VVUkwg
JXMgdG8gZGF0YWJhc2UiLCB1cmxGb3JMb2dnaW5nKHBhZ2VTbmFwc2hvdHNbaV0ucGFnZVVSTCku
YXNjaWkoKS5kYXRhKCkpOwogICAgIH0KIAo=
</data>
<flag name="review"
          id="9540"
          type_id="1"
          status="+"
          setter="mitz"
    />
          </attachment>
      

    </bug>

</bugzilla>