<?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>18174</bug_id>
          
          <creation_ts>2008-03-27 22:51:39 -0700</creation_ts>
          <short_desc>Crash when destroying frame from onload callback</short_desc>
          <delta_ts>2008-07-09 21:47:54 -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>WebKit Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Roman">eroman</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>75586</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Roman">eroman</who>
    <bug_when>2008-03-27 22:51:39 -0700</bug_when>
    <thetext>Append an iframe, register a suicidal onload, then set its src to &quot;about:blank&quot;.

Pretty much the same problem as:
  LayoutTests/fast/frames/onload-remove-iframe-crash.html

Difference is the entry point (here the death gears are set in motion by assigning the iframe.src property)

Will follow up with reduced test case (I observed the problem on http://www.hixie.ch/tests/adhoc/dom/level0/location/components/001.html)

Repro-ed it in Webkit Nightly (r31381), and Safari 3.1 (Windows XP)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75587</commentid>
    <comment_count>1</comment_count>
      <attachid>20148</attachid>
    <who name="Eric Roman">eroman</who>
    <bug_when>2008-03-27 22:54:25 -0700</bug_when>
    <thetext>Created attachment 20148
Crash by removing the iframe within its onload handler</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75599</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-03-28 02:06:03 -0700</bug_when>
    <thetext>See also: bug 15707.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85523</commentid>
    <comment_count>3</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2008-07-09 09:33:36 -0700</bug_when>
    <thetext>The crash I get with Hixie&apos;s site seems like a dupe of 15707.

The attached test case does not reproduce for me in Safari 3.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85524</commentid>
    <comment_count>4</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2008-07-09 09:35:02 -0700</bug_when>
    <thetext>The reduction *does* seem to cause an ASSERT in a ToT debug build.  Unknown if it manifests as a real issue in a release build, however.  (as I mentioned, doesn&apos;t crash Safari 3.1 for me)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85595</commentid>
    <comment_count>5</comment_count>
    <who name="Eric Roman">eroman</who>
    <bug_when>2008-07-09 20:41:40 -0700</bug_when>
    <thetext>Does not crash for me on latest webkit (35039) either.
(test case in question is attachment id=20148)

Strange that it doesn&apos;t crash your Safari 3.1 though -- I can repro the crash on both winxp and osx. Here is what I get on 10.4:

Version:        3.1.1 (4525.18)
Build Version:  1
Project Name:   WebBrowser
Source Version: 45251800

PID:    18378
Thread: 0

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000000

Thread 0 Crashed:
0   com.apple.WebCore        	0x95579a6f WebCore::Frame::page() const + 9
1   com.apple.WebCore        	0x956c2b09 WebCore::FrameLoader::load(WebCore::FrameLoadRequest const&amp;, bool, bool, WebCore::Event*, WebCore::HTMLFormElement*, WTF::HashMap&lt;WebCore::String, WebCore::String, WebCore::StringHash, WTF::HashTraits&lt;WebCore::String&gt;, WTF::HashTraits&gt; const&amp;) + 745
2   com.apple.WebCore        	0x956ca5a3 WebCore::FrameLoader::urlSelected(WebCore::FrameLoadRequest const&amp;, WebCore::Event*, bool, bool) + 311
3   com.apple.WebCore        	0x956ca205 WebCore::FrameLoader::urlSelected(WebCore::ResourceRequest const&amp;, WebCore::String const&amp;, WebCore::Event*, bool, bool) + 337
4   com.apple.WebCore        	0x956c9d7f WebCore::FrameLoader::changeLocation(WebCore::KURL const&amp;, WebCore::String const&amp;, bool, bool) + 651
5   com.apple.WebCore        	0x956c9ae2 WebCore::FrameLoader::changeLocation(WebCore::String const&amp;, WebCore::String const&amp;, bool, bool) + 96
6   com.apple.WebCore        	0x956c976e WebCore::FrameLoader::redirectionTimerFired(WebCore::Timer&lt;WebCore::FrameLoader&gt;*) + 90
7   com.apple.WebCore        	0x95a5c3fc WebCore::Timer&lt;WebCore::FrameLoader&gt;::fired() + 72
8   com.apple.WebCore        	0x9574b5a4 WebCore::TimerBase::fireTimers(double, WTF::Vector&lt;WebCore::TimerBase*, (unsigned long)0&gt; const&amp;) + 74
9   com.apple.WebCore        	0x9574b3de WebCore::TimerBase::sharedTimerFired() + 144
10  com.apple.WebCore        	0x9574b335 WebCore::timerFired(__CFRunLoopTimer*, void*) + 63
11  com.apple.CoreFoundation 	0x9082d756 CFRunLoopRunSpecific + 3341
12  com.apple.CoreFoundation 	0x9082ca42 CFRunLoopRunInMode + 61
13  com.apple.HIToolbox      	0x92df6878 RunCurrentEventLoopInMode + 285
14  com.apple.HIToolbox      	0x92df5f82 ReceiveNextEventCommon + 385
15  com.apple.HIToolbox      	0x92df5dd9 BlockUntilNextEventMatchingListInMode + 81
16  com.apple.AppKit         	0x9327cf45 _DPSNextEvent + 572
17  com.apple.AppKit         	0x9327cb37 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 137
18  com.apple.Safari         	0x0000761f 0x1000 + 26143
19  com.apple.AppKit         	0x932768c4 -[NSApplication run] + 512
20  com.apple.AppKit         	0x9326a820 NSApplicationMain + 573
21  com.apple.Safari         	0x000a960e 0x1000 + 689678
22  com.apple.Safari         	0x000a9535 0x1000 + 689461
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85596</commentid>
    <comment_count>6</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2008-07-09 21:47:54 -0700</bug_when>
    <thetext>Nevermind, I see the crash on 3.1 now.  

But still don&apos;t see it on current ToT.

I&apos;m about to land a test case with a fix for a different bug that covers this one, so I think we can close it.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>20148</attachid>
            <date>2008-03-27 22:54:25 -0700</date>
            <delta_ts>2008-03-27 22:54:25 -0700</delta_ts>
            <desc>Crash by removing the iframe within its onload handler</desc>
            <filename>iframe-destroy-in-onload-crash.html</filename>
            <type>text/html</type>
            <size>342</size>
            <attacher name="Eric Roman">eroman</attacher>
            
              <data encoding="base64">PGh0bWw+CiAgPHNjcmlwdD4KICAgIGZ1bmN0aW9uIHRyaWdnZXJDcmFzaCgpIHsKICAgICAgZnJh
bWUxID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnaWZyYW1lJyk7CiAgICAgIGRvY3VtZW50LmJv
ZHkuYXBwZW5kQ2hpbGQoZnJhbWUxKTsKICAgICAgZnJhbWUxLm9ubG9hZCA9IHJlbW92ZUZyYW1l
OwogICAgICBmcmFtZTEuc3JjID0gIiI7CiAgICB9CiAgICBmdW5jdGlvbiByZW1vdmVGcmFtZSgp
IHsKICAgICAgZnJhbWUxLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoZnJhbWUxKTsKICAgIH0KICA8
L3NjcmlwdD4KICA8Ym9keSBvbmxvYWQ9InRyaWdnZXJDcmFzaCgpIj48L2JvZHk+CjwvaHRtbD4K
</data>

          </attachment>
      

    </bug>

</bugzilla>