<?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>176061</bug_id>
          
          <creation_ts>2017-08-29 11:31:21 -0700</creation_ts>
          <short_desc>Assertion failure when opening a file with a missing tag closing bracket</short_desc>
          <delta_ts>2017-08-29 19:26:48 -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>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Said Abou-Hallawa">sabouhallawa</reporter>
          <assigned_to name="Said Abou-Hallawa">sabouhallawa</assigned_to>
          <cc>buildbot</cc>
    
    <cc>cdumez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>darin</cc>
    
    <cc>esprehn+autocc</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1343164</commentid>
    <comment_count>0</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2017-08-29 11:31:21 -0700</bug_when>
    <thetext>Open the following page in WebKit:

&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;
    &lt;script&gt;
    &lt;/script
&lt;/body&gt;
&lt;/html&gt;

Notice the &quot;&lt;/script&quot; does not have a closing bracket.

Result: Assertion failure with the following call stack:

#1	0x00000001c8d61f39 in WebCore::SegmentedString::advancePastNonNewline() at /Volumes/Data/WebKit/OpenSource/Source/WebCore/platform/text/SegmentedString.h:242
#2	0x00000001c8e4ebc9 in WebCore::HTMLTokenizer::commitToPartialEndTag(WebCore::SegmentedString&amp;, unsigned short, WebCore::HTMLTokenizer::State) at /Volumes/Data/WebKit/OpenSource/Source/WebCore/html/parser/HTMLTokenizer.cpp:162
#3	0x00000001c8e50d4d in WebCore::HTMLTokenizer::processToken(WebCore::SegmentedString&amp;) at /Volumes/Data/WebKit/OpenSource/Source/WebCore/html/parser/HTMLTokenizer.cpp:469
#4	0x00000001c8d42a9f in WebCore::HTMLTokenizer::nextToken(WebCore::SegmentedString&amp;) at /Volumes/Data/WebKit/OpenSource/Source/WebCore/html/parser/HTMLTokenizer.h:284
#5	0x00000001c8df7711 in WebCore::HTMLMetaCharsetParser::checkForMetaCharset(char const*, unsigned long) at /Volumes/Data/WebKit/OpenSource/Source/WebCore/html/parser/HTMLMetaCharsetParser.cpp:158
#6	0x00000001cabb2198 in WebCore::TextResourceDecoder::checkForMetaCharset(char const*, unsigned long) at /Volumes/Data/WebKit/OpenSource/Source/WebCore/loader/TextResourceDecoder.cpp:559
#7	0x00000001cabb2100 in WebCore::TextResourceDecoder::checkForHeadCharset(char const*, unsigned long, bool&amp;) at /Volumes/Data/WebKit/OpenSource/Source/WebCore/loader/TextResourceDecoder.cpp:554
#8	0x00000001cabb2a6a in WebCore::TextResourceDecoder::decode(char const*, unsigned long) at /Volumes/Data/WebKit/OpenSource/Source/WebCore/loader/TextResourceDecoder.cpp:617
#9	0x00000001c8719cad in WebCore::DecodedDataDocumentParser::appendBytes(WebCore::DocumentWriter&amp;, char const*, unsigned long) at /Volumes/Data/WebKit/OpenSource/Source/WebCore/dom/DecodedDataDocumentParser.cpp:45
#10	0x00000001c885e879 in WebCore::DocumentWriter::addData(char const*, unsigned long) at /Volumes/Data/WebKit/OpenSource/Source/WebCore/loader/DocumentWriter.cpp:253
#11	0x00000001c88155af in WebCore::DocumentLoader::commitData(char const*, unsigned long) at /Volumes/Data/WebKit/OpenSource/Source/WebCore/loader/DocumentLoader.cpp:914
#12	0x00000001094606af in WebKit::WebFrameLoaderClient::committedLoad(WebCore::DocumentLoader*, char const*, int) at /Volumes/Data/WebKit/OpenSource/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:975
#13	0x00000001c88182cd in WebCore::DocumentLoader::commitLoad(char const*, int) at /Volumes/Data/WebKit/OpenSource/Source/WebCore/loader/DocumentLoader.cpp:832
#14	0x00000001c88181ef in WebCore::DocumentLoader::dataReceived(char const*, int) at /Volumes/Data/WebKit/OpenSource/Source/WebCore/loader/DocumentLoader.cpp:947
#15	0x00000001c8818924 in WebCore::DocumentLoader::dataReceived(WebCore::CachedResource&amp;, char const*, int) at /Volumes/Data/WebKit/OpenSource/Source/WebCore/loader/DocumentLoader.cpp:920
#16	0x00000001c8290e98 in WebCore::CachedRawResource::notifyClientsDataWasReceived(char const*, unsigned int) at /Volumes/Data/WebKit/OpenSource/Source/WebCore/loader/cache/CachedRawResource.cpp:115
#17	0x00000001c8290cfd in WebCore::CachedRawResource::addDataBuffer(WebCore::SharedBuffer&amp;) at /Volumes/Data/WebKit/OpenSource/Source/WebCore/loader/cache/CachedRawResource.cpp:64
#18	0x00000001ca9dbd3a in WebCore::SubresourceLoader::didReceiveDataOrBuffer(char const*, int, WTF::RefPtr&lt;WebCore::SharedBuffer&gt;&amp;&amp;, long long, WebCore::DataPayloadType) at /Volumes/Data/WebKit/OpenSource/Source/WebCore/loader/SubresourceLoader.cpp:406
#19	0x00000001ca9dbb02 in WebCore::SubresourceLoader::didReceiveData(char const*, unsigned int, long long, WebCore::DataPayloadType) at /Volumes/Data/WebKit/OpenSource/Source/WebCore/loader/SubresourceLoader.cpp:374
#20	0x000000010983f014 in WebKit::WebResourceLoader::didReceiveData(IPC::DataReference const&amp;, long long) at /Volumes/Data/WebKit/OpenSource/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp:135
#21	0x00000001098429f0 in void IPC::callMemberFunctionImpl&lt;WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(IPC::DataReference const&amp;, long long), std::__1::tuple&lt;IPC::DataReference, long long&gt;, 0ul, 1ul&gt;(WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(IPC::DataReference const&amp;, long long), std::__1::tuple&lt;IPC::DataReference, long long&gt;&amp;&amp;, std::__1::integer_sequence&lt;unsigned long, 0ul, 1ul&gt;) at /Volumes/Data/WebKit/OpenSource/Source/WebKit/Platform/IPC/HandleMessage.h:40
#22	0x00000001098427c0 in void IPC::callMemberFunction&lt;WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(IPC::DataReference const&amp;, long long), std::__1::tuple&lt;IPC::DataReference, long long&gt;, std::__1::integer_sequence&lt;unsigned long, 0ul, 1ul&gt; &gt;(std::__1::tuple&lt;IPC::DataReference, long long&gt;&amp;&amp;, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(IPC::DataReference const&amp;, long long)) at /Volumes/Data/WebKit/OpenSource/Source/WebKit/Platform/IPC/HandleMessage.h:46
#23	0x0000000109841c11 in void IPC::handleMessage&lt;Messages::WebResourceLoader::DidReceiveData, WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(IPC::DataReference const&amp;, long long)&gt;(IPC::Decoder&amp;, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(IPC::DataReference const&amp;, long long)) at /Volumes/Data/WebKit/OpenSource/Source/WebKit/Platform/IPC/HandleMessage.h:126
#24	0x00000001098413d6 in WebKit::WebResourceLoader::didReceiveWebResourceLoaderMessage(IPC::Connection&amp;, IPC::Decoder&amp;) at /volumes/Data/WebKit/OpenSource/WebKitBuild/Debug/DerivedSources/WebKit2/WebResourceLoaderMessageReceiver.cpp:61
#25	0x0000000108f975a9 in WebKit::NetworkProcessConnection::didReceiveMessage(IPC::Connection&amp;, IPC::Decoder&amp;) at /Volumes/Data/WebKit/OpenSource/Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp:68
#26	0x0000000108d33983 in IPC::Connection::dispatchMessage(IPC::Decoder&amp;) at /Volumes/Data/WebKit/OpenSource/Source/WebKit/Platform/IPC/Connection.cpp:901
#27	0x0000000108d28ea8 in IPC::Connection::dispatchMessage(std::__1::unique_ptr&lt;IPC::Decoder, std::__1::default_delete&lt;IPC::Decoder&gt; &gt;) at /Volumes/Data/WebKit/OpenSource/Source/WebKit/Platform/IPC/Connection.cpp:928
#28	0x0000000108d33f8a in IPC::Connection::dispatchOneMessage() at /Volumes/Data/WebKit/OpenSource/Source/WebKit/Platform/IPC/Connection.cpp:959
#29	0x0000000108d4c4bd in IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr&lt;IPC::Decoder, std::__1::default_delete&lt;IPC::Decoder&gt; &gt;)::$_14::operator()() at /Volumes/Data/WebKit/OpenSource/Source/WebKit/Platform/IPC/Connection.cpp:895
#30	0x0000000108d4c419 in WTF::Function&lt;void ()&gt;::CallableWrapper&lt;IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr&lt;IPC::Decoder, std::__1::default_delete&lt;IPC::Decoder&gt; &gt;)::$_14&gt;::call() at /volumes/Data/WebKit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/Function.h:101
#31	0x00000001d60efe2b in WTF::Function&lt;void ()&gt;::operator()() const at /volumes/Data/WebKit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/Function.h:56
#32	0x00000001d61112e3 in WTF::RunLoop::performWork() at /Volumes/Data/WebKit/OpenSource/Source/WTF/wtf/RunLoop.cpp:106
#33	0x00000001d6111b64 in WTF::RunLoop::performWork(void*) at /Volumes/Data/WebKit/OpenSource/Source/WTF/wtf/cf/RunLoopCF.cpp:38</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343165</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-08-29 11:31:51 -0700</bug_when>
    <thetext>&lt;rdar://problem/34137537&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343288</commentid>
    <comment_count>2</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2017-08-29 16:08:14 -0700</bug_when>
    <thetext>The bug here is in HTMLTokenizer::commitToPartialEndTag, which calls SegmentedString ::advancePastNonNewline, but instead it needs to call SegmentedString::advance. That&apos;s all it will take to fix this; just call advance instead of advancePastNonNewline.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343334</commentid>
    <comment_count>3</comment_count>
      <attachid>319313</attachid>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2017-08-29 17:12:46 -0700</bug_when>
    <thetext>Created attachment 319313
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343393</commentid>
    <comment_count>4</comment_count>
      <attachid>319313</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-08-29 19:26:46 -0700</bug_when>
    <thetext>Comment on attachment 319313
Patch

Clearing flags on attachment: 319313

Committed r221335: &lt;http://trac.webkit.org/changeset/221335&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343394</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-08-29 19:26:48 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>319313</attachid>
            <date>2017-08-29 17:12:46 -0700</date>
            <delta_ts>2017-08-29 19:26:46 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-176061-20170829171245.patch</filename>
            <type>text/plain</type>
            <size>3156</size>
            <attacher name="Said Abou-Hallawa">sabouhallawa</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT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hp
c3RlbnQpCisrKyBMYXlvdXRUZXN0cy9mYXN0L3Rva2VuaXplci9taXNzaW5nLXNjcmlwdC10YWct
Y2xvc2luZy1icmFja2V0LWV4cGVjdGVkLnR4dAkod29ya2luZyBjb3B5KQpAQCAtMCwwICsxIEBA
CitQYXNzIGlmIG5vIGFzc2VydGlvbiBmYWlsdXJlIGhhcHBlbnMuCkluZGV4OiBMYXlvdXRUZXN0
cy9mYXN0L3Rva2VuaXplci9taXNzaW5nLXNjcmlwdC10YWctY2xvc2luZy1icmFja2V0Lmh0bWwK
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PQotLS0gTGF5b3V0VGVzdHMvZmFzdC90b2tlbml6ZXIvbWlzc2luZy1zY3JpcHQt
dGFnLWNsb3NpbmctYnJhY2tldC5odG1sCShub25leGlzdGVudCkKKysrIExheW91dFRlc3RzL2Zh
c3QvdG9rZW5pemVyL21pc3Npbmctc2NyaXB0LXRhZy1jbG9zaW5nLWJyYWNrZXQuaHRtbAkod29y
a2luZyBjb3B5KQpAQCAtMCwwICsxLDcgQEAKKzxib2R5PgorICAgIDxwPlBhc3MgaWYgbm8gYXNz
ZXJ0aW9uIGZhaWx1cmUgaGFwcGVucy48L3A+CisgICAgPHNjcmlwdD4KKyAgICAgICAgaWYgKHdp
bmRvdy50ZXN0UnVubmVyKQorICAgICAgICAgICAgdGVzdFJ1bm5lci5kdW1wQXNUZXh0KCk7Cisg
ICAgPC9zY3JpcHQKKzwvYm9keT4K
</data>

          </attachment>
      

    </bug>

</bugzilla>