<?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>11010</bug_id>
          
          <creation_ts>2006-09-24 13:29:10 -0700</creation_ts>
          <short_desc>REGRESSION: Repro crash in &lt;script&gt; onload event dispatch</short_desc>
          <delta_ts>2006-12-20 03:03:56 -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>New Bugs</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://apartmentcities.com/Apartments/map.asp?apt=12606</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction, InRadar, Regression</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>mitz</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>miles_b</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>56365</commentid>
    <comment_count>0</comment_count>
    <who name="">mitz</who>
    <bug_when>2006-09-24 13:29:10 -0700</bug_when>
    <thetext>This is what I get going to the above URL with TOT:

EXC_BAD_ACCESS (0x0001)
KERN_PROTECTION_FAILURE (0x0002) at 0x003a0033

Thread 0 Crashed:
0    WebCore::TreeShared&lt;WebCore::Node&gt;::ref() + 32 (Shared.h:51)
1    WebCore::EventTargetNode::dispatchGenericEvent(WTF::PassRefPtr&lt;WebCore::Event&gt;, int&amp;, bool) + 304 (EventTargetNode.cpp:179)
2    WebCore::EventTargetNode::dispatchEvent(WTF::PassRefPtr&lt;WebCore::Event&gt;, int&amp;, bool) + 348 (EventTargetNode.cpp:292)
3    WebCore::EventTargetNode::dispatchHTMLEvent(WebCore::AtomicString const&amp;, bool, bool) + 172 (EventTargetNode.cpp:481)
4    WebCore::HTMLScriptElement::notifyFinished(WebCore::CachedResource*) + 244 (HTMLScriptElement.cpp:155)
5    WebCore::CachedScript::checkNotify() + 112 (CachedScript.cpp:108)
6    WebCore::CachedScript::data(WTF::Vector&lt;char, (unsigned long)0&gt;&amp;, bool) + 184 (CachedScript.cpp:100)
7    WebCore::Loader::receivedAllData(WebCore::ResourceLoader*, NSData*) + 464 (loader.cpp:138)
8    -[WebCoreResourceLoaderImp finishJobAndHandle:] + 180 (WebCoreResourceLoaderImp.mm:98)
9    -[WebCoreResourceLoaderImp finishWithData:] + 196 (WebCoreResourceLoaderImp.mm:130)
...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56405</commentid>
    <comment_count>1</comment_count>
    <who name="">mitz</who>
    <bug_when>2006-09-24 23:33:49 -0700</bug_when>
    <thetext>The problem appears to be a script that deletes its own &lt;script&gt; element. Looks like the fix is for
HTMLScriptElement::notifyFinished() to protect itself with a ref()/deref() (it will also be cleaner to change the cs-&gt;deref(this) to m_cachedScript-&gt;deref(this) only if m_cachedScript is still non-0). Other callers to HTMLScriptElement::evaluateScript() appear to be safe, since it&apos;s the last thing they call.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56431</commentid>
    <comment_count>2</comment_count>
      <attachid>10758</attachid>
    <who name="">mitz</who>
    <bug_when>2006-09-25 09:18:00 -0700</bug_when>
    <thetext>Created attachment 10758
Reduction (will crash)

Crashes run-webkit-tests immediately, in Safari you need to reload to get the crash (might be a good junk/bad junk thing).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46638</commentid>
    <comment_count>3</comment_count>
    <who name="Stephanie Lewis">slewis</who>
    <bug_when>2006-11-06 21:53:37 -0800</bug_when>
    <thetext>radar 4701860</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41943</commentid>
    <comment_count>4</comment_count>
    <who name="">mitz</who>
    <bug_when>2006-12-15 02:01:40 -0800</bug_when>
    <thetext>*** Bug 11837 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41089</commentid>
    <comment_count>5</comment_count>
    <who name="">mitz</who>
    <bug_when>2006-12-19 22:36:48 -0800</bug_when>
    <thetext>Fixed (completely independently of this Bugzilla bug) by Anders in r18335.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41097</commentid>
    <comment_count>6</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2006-12-20 03:03:56 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; radar 4701860

Per r18335, also:

&lt;rdar://problem/4726407&gt; [9A255] Crash in WebCore::EventTargetNode::dispatchEvent

http://trac.webkit.org/projects/webkit/changeset/18335

</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>10758</attachid>
            <date>2006-09-25 09:18:00 -0700</date>
            <delta_ts>2006-09-25 09:18:00 -0700</delta_ts>
            <desc>Reduction (will crash)</desc>
            <filename>deleted-script-crash.html</filename>
            <type>text/html</type>
            <size>306</size>
            <attacher>mitz</attacher>
            
              <data encoding="base64">PGJvZHk+CjxzY3JpcHQgaWQ9InNjcHQiPjwvc2NyaXB0PgpSZWxvYWQgdG8gY3Jhc2guCjxzY3Jp
cHQ+CiAgICB2YXIgc2NwdCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdzY3B0Jyk7CiAgICBz
Y3B0Lm9ubG9hZCA9ICJmYWxzZSI7CiAgICBzY3B0LnNyYyA9ICJkYXRhOnRleHQvamF2YXNjcmlw
dCxzY3B0LnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoc2NwdCk7IHNjcHQgPSBudWxsOyB6ID0gbmV3
IEFycmF5KCk7IGZvciAoaSA9IDA7IGkgPCAxMDAwOyBpKyspIHpbaV0gPSBuZXcgT2JqZWN0KCk7
IjsKPC9zY3JpcHQ+CjwvYm9keT4K
</data>

          </attachment>
      

    </bug>

</bugzilla>