<?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>149460</bug_id>
          
          <creation_ts>2015-09-22 08:37:46 -0700</creation_ts>
          <short_desc>ASSERTION FAILED: !url.protocolIsData() in WebCore::SVGURIReference::isExternalURIReference</short_desc>
          <delta_ts>2024-10-17 01:24:57 -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>SVG</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=261806</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>116980</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Renata Hodovan">rhodovan.u-szeged</reporter>
          <assigned_to>zsun</assigned_to>
          <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>emilio</cc>
    
    <cc>fujii</cc>
    
    <cc>krit</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1128002</commentid>
    <comment_count>0</comment_count>
      <attachid>261744</attachid>
    <who name="Renata Hodovan">rhodovan.u-szeged</who>
    <bug_when>2015-09-22 08:37:46 -0700</bug_when>
    <thetext>Created attachment 261744
Test

Load this test with debug WebKit:

&lt;svg&gt;
    &lt;use xlink:href=&quot;data:foo.bar&quot;&gt;&lt;/use&gt;
&lt;/svg&gt;


Backtrace:

ASSERTION FAILED: !url.protocolIsData()
../../Source/WebCore/svg/SVGURIReference.h(48) : static bool WebCore::SVGURIReference::isExternalURIReference(const WTF::String&amp;, WebCore::Document&amp;)

#0  0x00007fffec64eab6 in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:321
#1  0x00007ffff287cad1 in WebCore::SVGURIReference::isExternalURIReference (uri=..., document=...) at ../../Source/WebCore/svg/SVGURIReference.h:48
#2  0x00007ffff36fc51c in WebCore::SVGUseElement::updateExternalDocument (this=0x7fffd5ad9000) at ../../Source/WebCore/svg/SVGUseElement.cpp:534
#3  0x00007ffff36f9965 in WebCore::SVGUseElement::insertedInto (this=0x7fffd5ad9000, rootParent=...) at ../../Source/WebCore/svg/SVGUseElement.cpp:110
#4  0x00007ffff28f88af in WebCore::notifyNodeInsertedIntoDocument (insertionPoint=..., node=..., postInsertionNotificationTargets=...)
    at ../../Source/WebCore/dom/ContainerNodeAlgorithms.cpp:71
#5  0x00007ffff28f8ac2 in WebCore::notifyChildNodeInserted (insertionPoint=..., node=..., postInsertionNotificationTargets=...)
    at ../../Source/WebCore/dom/ContainerNodeAlgorithms.cpp:97
#6  0x00007ffff28ebbd1 in WebCore::ContainerNode::notifyChildInserted (this=0x7fffd5adb000, child=..., source=WebCore::ContainerNode::ChildChangeSourceParser)
    at ../../Source/WebCore/dom/ContainerNode.cpp:331
#7  0x00007ffff28ed982 in WebCore::ContainerNode::parserAppendChild (this=0x7fffd5adb000, newChild=...) at ../../Source/WebCore/dom/ContainerNode.cpp:734
#8  0x00007ffff2ccb299 in WebCore::insert (task=...) at ../../Source/WebCore/html/parser/HTMLConstructionSite.cpp:107
#9  0x00007ffff2ccb33c in WebCore::executeInsertTask (task=...) at ../../Source/WebCore/html/parser/HTMLConstructionSite.cpp:114
#10 0x00007ffff2ccb58a in WebCore::executeTask (task=...) at ../../Source/WebCore/html/parser/HTMLConstructionSite.cpp:152
#11 0x00007ffff2ccb918 in WebCore::HTMLConstructionSite::executeQueuedTasks (this=0x7fffd5af7920)
    at ../../Source/WebCore/html/parser/HTMLConstructionSite.cpp:202
#12 0x00007ffff2cff2c7 in WebCore::HTMLTreeBuilder::constructTree (this=0x7fffd5af7900, token=...) at ../../Source/WebCore/html/parser/HTMLTreeBuilder.cpp:355
#13 0x00007ffff2cd55d8 in WebCore::HTMLDocumentParser::constructTreeFromHTMLToken (this=0x7fffd58165c0, rawToken=...)
    at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:321
#14 0x00007ffff2cd5208 in WebCore::HTMLDocumentParser::pumpTokenizer (this=0x7fffd58165c0, mode=WebCore::HTMLDocumentParser::AllowYield)
    at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:276
#15 0x00007ffff2cd4ac7 in WebCore::HTMLDocumentParser::pumpTokenizerIfPossible (this=0x7fffd58165c0, mode=WebCore::HTMLDocumentParser::AllowYield)
    at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:166
#16 0x00007ffff2cd5b3c in WebCore::HTMLDocumentParser::append(WTF::RefPtr&lt;WTF::StringImpl&gt;&amp;&amp;) (this=0x7fffd58165c0, 
    inputSource=&lt;unknown type in webkit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37, CU 0x0, DIE 0x6d8e5&gt;)
    at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:391
#17 0x00007ffff2908a65 in WebCore::DecodedDataDocumentParser::flush (this=0x7fffd58165c0, writer=...)
    at ../../Source/WebCore/dom/DecodedDataDocumentParser.cpp:60
#18 0x00007ffff2e68c3e in WebCore::DocumentWriter::end (this=0x7fffd58360a0) at ../../Source/WebCore/loader/DocumentWriter.cpp:244
#19 0x00007ffff2e5264a in WebCore::DocumentLoader::finishedLoading (this=0x7fffd5836000, finishTime=0) at ../../Source/WebCore/loader/DocumentLoader.cpp:430
#20 0x00007ffff2e523a8 in WebCore::DocumentLoader::notifyFinished (this=0x7fffd5836000, resource=0x7fffd580f9c0)
    at ../../Source/WebCore/loader/DocumentLoader.cpp:377
#21 0x00007ffff2f10f7d in WebCore::CachedResource::checkNotify (this=0x7fffd580f9c0) at ../../Source/WebCore/loader/cache/CachedResource.cpp:297
#22 0x00007ffff2f1108c in WebCore::CachedResource::finishLoading (this=0x7fffd580f9c0) at ../../Source/WebCore/loader/cache/CachedResource.cpp:313
#23 0x00007ffff2f0d28a in WebCore::CachedRawResource::finishLoading (this=0x7fffd580f9c0, data=0x7fffd5bfde80)
    at ../../Source/WebCore/loader/cache/CachedRawResource.cpp:103
#24 0x00007ffff2ebd812 in WebCore::SubresourceLoader::didFinishLoading (this=0x7fffd5836c00, finishTime=0)
    at ../../Source/WebCore/loader/SubresourceLoader.cpp:372
#25 0x00007ffff2eb828b in WebCore::ResourceLoader::didFinishLoading (this=0x7fffd5836c00, finishTime=0) at ../../Source/WebCore/loader/ResourceLoader.cpp:631
#26 0x00007ffff38e70f6 in WebCore::readCallback (asyncResult=0xb4e9b0, data=0x7fffd5bb7300)
    at ../../Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:1340
#27 0x00007fffe945796a in async_ready_callback_wrapper (source_object=0xa35db0, res=0xb4e9b0, user_data=0x7fffd5bb7300) at ginputstream.c:529
#28 0x00007fffe947d453 in g_task_return_now (task=0xb4e9b0) at gtask.c:1088
#29 0x00007fffe947d489 in complete_in_idle_cb (task=0xb4e9b0) at gtask.c:1102
#30 0x00007fffe8eb7a9d in g_main_dispatch (context=0x492400) at gmain.c:3122
#31 g_main_context_dispatch (context=context@entry=0x492400) at gmain.c:3737
#32 0x00007fffe8eb7e70 in g_main_context_iterate (context=0x492400, block=block@entry=1, dispatch=dispatch@entry=1, self=&lt;optimized out&gt;) at gmain.c:3808
#33 0x00007fffe8eb8192 in g_main_loop_run (loop=0x5f15d0) at gmain.c:4002
#34 0x00007ffff406313f in WTF::RunLoop::run () at ../../Source/WTF/wtf/glib/RunLoopGLib.cpp:67
#35 0x00007ffff2300a23 in WebKit::ChildProcessMain&lt;WebKit::WebProcess, WebKit::WebProcessMain&gt; (argc=2, argv=0x7fffffffd5b8)
    at ../../Source/WebKit2/Shared/unix/ChildProcessMain.h:61
#36 0x00007ffff2300880 in WebKit::WebProcessMainUnix (argc=2, argv=0x7fffffffd5b8) at ../../Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp:77
#37 0x00000000004008da in main (argc=2, argv=0x7fffffffd5b8) at ../../Source/WebKit2/WebProcess/EntryPoint/unix/WebProcessMain.cpp:44</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217679</commentid>
    <comment_count>1</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2016-08-04 17:19:52 -0700</bug_when>
    <thetext>This reproduces in r204037.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217680</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-08-04 17:20:17 -0700</bug_when>
    <thetext>&lt;rdar://problem/27710775&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217789</commentid>
    <comment_count>3</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2016-08-04 19:02:59 -0700</bug_when>
    <thetext>Correct SVG href should not be a data url. But if this happens we should not assert. This assertion was added by https://trac.webkit.org/changeset/183053. The changeLog does not describe why this assertion was added. But I think it was added because the assumption was the mask data URI was handled by the CSS parser and SVGURIReference should not be receiving a data URI which might correct for masks. But it is not the case for the SVG href itself which can be a data uri for incorrect SVG documents.

So I think this assertion is not correct and should be removed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1580602</commentid>
    <comment_count>4</comment_count>
    <who name="Emilio Cobos Álvarez (:emilio)">emilio</who>
    <bug_when>2019-10-16 11:37:54 -0700</bug_when>
    <thetext>*** Bug 202809 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2011589</commentid>
    <comment_count>5</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2024-02-07 17:12:39 -0800</bug_when>
    <thetext>imported/w3c/web-platform-tests/css/filter-effects/svg-feimage-002.html is also crashing due to this assertion failure.
274235@main added the test.
https://results.webkit.org/?suite=layout-tests&amp;test=imported%2Fw3c%2Fweb-platform-tests%2Fcss%2Ffilter-effects%2Fsvg-feimage-002.html
https://build.webkit.org/results/Apple-Sonoma-Debug-AppleSilicon-WK1-Tests/274239@main%20(1578)/imported/w3c/web-platform-tests/css/filter-effects/svg-feimage-002-stderr.txt</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2068336</commentid>
    <comment_count>6</comment_count>
    <who name="">zsun</who>
    <bug_when>2024-10-16 01:27:30 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/34627</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2068706</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-10-17 01:24:54 -0700</bug_when>
    <thetext>Committed 285321@main (04332cec0029): &lt;https://commits.webkit.org/285321@main&gt;

Reviewed commits have been landed. Closing PR #34627 and removing active labels.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>261744</attachid>
            <date>2015-09-22 08:37:46 -0700</date>
            <delta_ts>2015-09-22 08:37:46 -0700</delta_ts>
            <desc>Test</desc>
            <filename>crash.html</filename>
            <type>text/html</type>
            <size>54</size>
            <attacher name="Renata Hodovan">rhodovan.u-szeged</attacher>
            
              <data encoding="base64">PHN2Zz4KICAgIDx1c2UgeGxpbms6aHJlZj0iZGF0YTpmb28uYmFyIj48L3VzZT4KPC9zdmc+
</data>

          </attachment>
      

    </bug>

</bugzilla>