<?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>35044</bug_id>
          
          <creation_ts>2010-02-17 10:36:35 -0800</creation_ts>
          <short_desc>Crash in XML tokenizer reloading zoom-coords-viewattr-01-b.svg</short_desc>
          <delta_ts>2010-03-03 14:05:44 -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>XML</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>InRadar</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Alexey Proskuryakov">ap</assigned_to>
          <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>191081</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-02-17 10:36:35 -0800</bug_when>
    <thetext>While debugging some SVG entity issues, I&apos;ve twice hit a crash in XMLTokenizer because m_currentNode is null here:

#0  0x03e31619 in WebCore::Node::isTextNode (this=0x0) at Node.h:166
#1  0x047dfa10 in WebCore::XMLTokenizer::characters (this=0x1f6d4320, s=0x2540a880 &quot;\n    &quot;, len=5) at /Volumes/InternalData/Development/WebKit/OpenSource/WebCore/dom/XMLTokenizerLibxml2.cpp:903
#2  0x047e2ed5 in WebCore::PendingCallbacks::PendingCharactersCallback::call (this=0x2540ad10, tokenizer=0x1f6d4320) at /Volumes/InternalData/Development/WebKit/OpenSource/WebCore/dom/XMLTokenizerLibxml2.cpp:246
#3  0x047e0d57 in WebCore::PendingCallbacks::callAndRemoveFirstCallback (this=0x1f6b33d0, tokenizer=0x1f6d4320) at /Volumes/InternalData/Development/WebKit/OpenSource/WebCore/dom/XMLTokenizerLibxml2.cpp:188
#4  0x047dc303 in WebCore::XMLTokenizer::resumeParsing (this=0x1f6d4320) at /Volumes/InternalData/Development/WebKit/OpenSource/WebCore/dom/XMLTokenizerLibxml2.cpp:1375
#5  0x047dbcfd in WebCore::XMLTokenizer::notifyFinished (this=0x1f6d4320, unusedResource=0x81ff800) at /Volumes/InternalData/Development/WebKit/OpenSource/WebCore/dom/XMLTokenizer.cpp:334
#6  0x03d4217c in WebCore::CachedScript::checkNotify (this=0x81ff800) at /Volumes/InternalData/Development/WebKit/OpenSource/WebCore/loader/CachedScript.cpp:105
#7  0x03d42242 in WebCore::CachedScript::data (this=0x81ff800, data=@0xbfffe3d0, allDataReceived=true) at /Volumes/InternalData/Development/WebKit/OpenSource/WebCore/loader/CachedScript.cpp:95
#8  0x0440a46e in WebCore::Loader::Host::didFinishLoading (this=0xc94220, loader=0x8437200) at /Volumes/InternalData/Development/WebKit/OpenSource/WebCore/loader/loader.cpp:397
#9  0x0467c002 in WebCore::SubresourceLoader::didFinishLoading (this=0x8437200) at /Volumes/InternalData/Development/WebKit/OpenSource/WebCore/loader/SubresourceLoader.cpp:184
#10 0x045daf5a in WebCore::ResourceLoader::didFinishLoading (this=0x8437200) at /Volumes/InternalData/Development/WebKit/OpenSource/WebCore/loader/ResourceLoader.cpp:403
#11 0x045d7497 in -[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:] (self=0x2055a3c0, _cmd=0x9344e564, connection=0x20559180) at /Volumes/InternalData/Development/WebKit/OpenSource/WebCore/platform/network/mac/ResourceHandleMac.mm:789
#12 0x906e9497 in -[NSURLConnection(NSURLConnectionReallyInternal) sendDidFinishLoading] ()
#13 0x906e9403 in _NSURLConnectionDidFinishLoading ()
#14 0x91979ba4 in URLConnectionClient::_clientDidFinishLoading ()
#15 0x9197a8fa in URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload ()
#16 0x9197abaa in URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload ()
#17 0x91979370 in URLConnectionClient::processEvents ()
#18 0x91926d03 in MultiplexerSource::perform ()
#19 0x9183640f in CFRunLoopRunSpecific ()
#20 0x91836aa8 in CFRunLoopRunInMode ()
#21 0x93d542ac in RunCurrentEventLoopInMode ()
#22 0x93d53ffe in ReceiveNextEventCommon ()
#23 0x93d53f39 in BlockUntilNextEventMatchingListInMode ()
#24 0x959236d5 in _DPSNextEvent ()
#25 0x95922f88 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#26 0x0000c045 in ?? ()
#27 0x9591bf9f in -[NSApplication run] ()
#28 0x958e91d8 in NSApplicationMain ()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>191121</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-02-17 11:43:27 -0800</bug_when>
    <thetext>I can get this crash by reloading LayoutTests/svg/zoom/page/zoom-coords-viewattr-01-b.svg a few times on Leopard.

clearCurrentNodeStack() has been called already.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>191127</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-02-17 11:54:12 -0800</bug_when>
    <thetext>It seems like the XMLTokenizer is getting resurrected after an end() by CachedScript::checkNotify() calling notifyFinished() on the clients.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>191176</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-02-17 13:27:20 -0800</bug_when>
    <thetext>Surprising is that the tokenizer also thinks that it has been paused (otherwise, an assertion in resumeParsing would have failed).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>192812</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-02-23 00:39:34 -0800</bug_when>
    <thetext>&lt;rdar://problem/7679143&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>195709</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-03-03 12:32:17 -0800</bug_when>
    <thetext>Sorry, now I&apos;m getting the crash in 4.0.4, too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>195739</commentid>
    <comment_count>6</comment_count>
      <attachid>49940</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-03-03 13:44:56 -0800</bug_when>
    <thetext>Created attachment 49940
proposed fix</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>195750</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-03-03 14:05:44 -0800</bug_when>
    <thetext>Committed in &lt;http://trac.webkit.org/changeset/55475&gt;.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>49940</attachid>
            <date>2010-03-03 13:44:56 -0800</date>
            <delta_ts>2010-03-03 13:46:04 -0800</delta_ts>
            <desc>proposed fix</desc>
            <filename>SVGCrash.txt</filename>
            <type>text/plain</type>
            <size>1369</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA1NTQ3MykKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLD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0KLS0tIFdlYkNvcmUvZG9tL1hNTFRva2VuaXplci5jcHAJKHJl
dmlzaW9uIDU1NDMxKQorKysgV2ViQ29yZS9kb20vWE1MVG9rZW5pemVyLmNwcAkod29ya2luZyBj
b3B5KQpAQCAtMjA2LDcgKzIwNiwxMSBAQCB2b2lkIFhNTFRva2VuaXplcjo6ZXhpdFRleHQoKQog
dm9pZCBYTUxUb2tlbml6ZXI6OmVuZCgpCiB7CiAgICAgZG9FbmQoKTsKLSAgICAKKworICAgIC8v
IGRvRW5kKCkgY291bGQgcHJvY2VzcyBhIHNjcmlwdCB0YWcsIHRodXMgcGF1c2luZyBwYXJzaW5n
LgorICAgIGlmIChtX3BhcnNlclBhdXNlZCkKKyAgICAgICAgcmV0dXJuOworCiAgICAgaWYgKG1f
c2F3RXJyb3IpCiAgICAgICAgIGluc2VydEVycm9yTWVzc2FnZUJsb2NrKCk7CiAgICAgZWxzZSB7
Cg==
</data>
<flag name="review"
          id="32943"
          type_id="1"
          status="+"
          setter="adele"
    />
          </attachment>
      

    </bug>

</bugzilla>