<?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>141646</bug_id>
          
          <creation_ts>2015-02-16 07:37:02 -0800</creation_ts>
          <short_desc>Assert should not reached failure in  WebCore::lastHyphenLocation</short_desc>
          <delta_ts>2018-01-16 11:28:03 -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>Platform</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</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>
          
          <blocked>116980</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Renata Hodovan">rhodovan.u-szeged</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>darin</cc>
    
    <cc>hyatt</cc>
    
    <cc>koivisto</cc>
    
    <cc>mitz</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1069430</commentid>
    <comment_count>0</comment_count>
      <attachid>246652</attachid>
    <who name="Renata Hodovan">rhodovan.u-szeged</who>
    <bug_when>2015-02-16 07:37:02 -0800</bug_when>
    <thetext>Created attachment 246652
Test case

Load this with debug WK:


&lt;!DOCTYPE html&gt;
&lt;style&gt;
* {
    letter-spacing: 2821vmin;
    zoom: 7823;
}
&lt;/style&gt;
&lt;form&gt;
    &lt;small&gt;
        &lt;abbr&gt;
            &lt;mark&gt;
                &lt;rp&gt;
                    &lt;label&gt;
                        &lt;q&gt;&lt;/q&gt;
                    &lt;/label&gt;
                &lt;/rp&gt;
            &lt;/mark&gt;
        &lt;/abbr&gt;
    &lt;/small&gt;
&lt;/form&gt;


Backtrace:

SHOULD NEVER BE REACHED
../../Source/WebCore/platform/text/Hyphenation.cpp(41) : size_t WebCore::lastHyphenLocation(WTF::StringView, size_t, const WTF::AtomicString&amp;)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff94ed1700 (LWP 13064)]
0x00007fffed74709f in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:321
321	    *(int *)(uintptr_t)0xbbadbeef = 0;
#0  0x00007fffed74709f in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:321
#1  0x00007ffff3754eb5 in WebCore::lastHyphenLocation () at ../../Source/WebCore/platform/text/Hyphenation.cpp:41
#2  0x00007ffff39a91d6 in WebCore::maxWordFragmentWidth (renderer=0x7fffd9fa8500, style=..., font=..., word=..., minimumPrefixLength=0, minimumSuffixLength=0, suffixStart=@0x7fffffff9e4c: 0, fallbackFonts=..., glyphOverflow=...) at ../../Source/WebCore/rendering/RenderText.cpp:654
#3  0x00007ffff39aa059 in WebCore::RenderText::computePreferredLogicalWidths (this=0x7fffd9fa8500, leadWidth=0, fallbackFonts=..., glyphOverflow=...) at ../../Source/WebCore/rendering/RenderText.cpp:820
#4  0x00007ffff39abad8 in WebCore::RenderText::width (this=0x7fffd9fa8500, from=0, len=1, f=..., xPos=0, fallbackFonts=0x7fffffffa858, glyphOverflow=0x7fffffffa060) at ../../Source/WebCore/rendering/RenderText.cpp:1234
#5  0x00007ffff39ff26d in WebCore::textWidth (text=0x7fffd9fa8500, from=0, len=1, font=..., xPos=0, isFixedPitch=false, collapseWhiteSpace=true, fallbackFonts=..., layout=0x0) at ../../Source/WebCore/rendering/line/BreakingContextInlineHeaders.h:505
#6  0x00007ffff3a02041 in WebCore::BreakingContext::handleText (this=0x7fffffffa3b0, wordMeasurements=..., hyphenated=@0x7fffffffa718: false, consecutiveHyphenatedLines=@0x7fffffffa510: 0) at ../../Source/WebCore/rendering/line/BreakingContextInlineHeaders.h:903
#7  0x00007ffff39fc401 in WebCore::LineBreaker::nextSegmentBreak (this=0x7fffffffa710, resolver=..., lineInfo=..., renderTextInfo=..., lastFloatFromPreviousLine=0x0, consecutiveHyphenatedLines=0, wordMeasurements=...) at ../../Source/WebCore/rendering/line/LineBreaker.cpp:115
#8  0x00007ffff39fc09f in WebCore::LineBreaker::nextLineBreak (this=0x7fffffffa710, resolver=..., lineInfo=..., renderTextInfo=..., lastFloatFromPreviousLine=0x0, consecutiveHyphenatedLines=0, wordMeasurements=...) at ../../Source/WebCore/rendering/line/LineBreaker.cpp:82
#9  0x00007ffff3812e5c in WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange (this=0x7fffd9fcfb80, layoutState=..., resolver=..., cleanLineStart=..., cleanLineBidiStatus=..., consecutiveHyphenatedLines=0) at ../../Source/WebCore/rendering/RenderBlockLineLayout.cpp:1180
#10 0x00007ffff38129cf in WebCore::RenderBlockFlow::layoutRunsAndFloats (this=0x7fffd9fcfb80, layoutState=..., hasInlineChild=true) at ../../Source/WebCore/rendering/RenderBlockLineLayout.cpp:1124
#11 0x00007ffff381526f in WebCore::RenderBlockFlow::layoutLineBoxes (this=0x7fffd9fcfb80, relayoutChildren=false, repaintLogicalTop=..., repaintLogicalBottom=...) at ../../Source/WebCore/rendering/RenderBlockLineLayout.cpp:1542
#12 0x00007ffff37f477d in WebCore::RenderBlockFlow::layoutInlineChildren (this=0x7fffd9fcfb80, relayoutChildren=false, repaintLogicalTop=..., repaintLogicalBottom=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:647
#13 0x00007ffff37f3a94 in WebCore::RenderBlockFlow::layoutBlock (this=0x7fffd9fcfb80, relayoutChildren=false, pageLogicalHeight=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:479
#14 0x00007ffff37c9623 in WebCore::RenderBlock::layout (this=0x7fffd9fcfb80) at ../../Source/WebCore/rendering/RenderBlock.cpp:926
#15 0x00007ffff37f4b44 in WebCore::RenderBlockFlow::layoutBlockChild (this=0x7fffd9fcf958, child=..., marginInfo=..., previousFloatLogicalBottom=..., maxFloatLogicalBottom=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:705
#16 0x00007ffff37f468b in WebCore::RenderBlockFlow::layoutBlockChildren (this=0x7fffd9fcf958, relayoutChildren=false, maxFloatLogicalBottom=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:628
#17 0x00007ffff37f3ab8 in WebCore::RenderBlockFlow::layoutBlock (this=0x7fffd9fcf958, relayoutChildren=false, pageLogicalHeight=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:481
#18 0x00007ffff37c9623 in WebCore::RenderBlock::layout (this=0x7fffd9fcf958) at ../../Source/WebCore/rendering/RenderBlock.cpp:926
#19 0x00007ffff37f4b44 in WebCore::RenderBlockFlow::layoutBlockChild (this=0x7fffd9fcf8a0, child=..., marginInfo=..., previousFloatLogicalBottom=..., maxFloatLogicalBottom=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:705
#20 0x00007ffff37f468b in WebCore::RenderBlockFlow::layoutBlockChildren (this=0x7fffd9fcf8a0, relayoutChildren=true, maxFloatLogicalBottom=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:628
#21 0x00007ffff37f3ab8 in WebCore::RenderBlockFlow::layoutBlock (this=0x7fffd9fcf8a0, relayoutChildren=true, pageLogicalHeight=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:481
#22 0x00007ffff37c9623 in WebCore::RenderBlock::layout (this=0x7fffd9fcf8a0) at ../../Source/WebCore/rendering/RenderBlock.cpp:926
#23 0x00007ffff37f4b44 in WebCore::RenderBlockFlow::layoutBlockChild (this=0x7fffd97ea218, child=..., marginInfo=..., previousFloatLogicalBottom=..., maxFloatLogicalBottom=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:705
#24 0x00007ffff37f468b in WebCore::RenderBlockFlow::layoutBlockChildren (this=0x7fffd97ea218, relayoutChildren=true, maxFloatLogicalBottom=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:628
#25 0x00007ffff37f3ab8 in WebCore::RenderBlockFlow::layoutBlock (this=0x7fffd97ea218, relayoutChildren=true, pageLogicalHeight=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:481
#26 0x00007ffff37c9623 in WebCore::RenderBlock::layout (this=0x7fffd97ea218) at ../../Source/WebCore/rendering/RenderBlock.cpp:926
#27 0x00007ffff39c894f in WebCore::RenderView::layoutContent (this=0x7fffd97ea218, state=...) at ../../Source/WebCore/rendering/RenderView.cpp:232
#28 0x00007ffff39c901f in WebCore::RenderView::layout (this=0x7fffd97ea218) at ../../Source/WebCore/rendering/RenderView.cpp:357
#29 0x00007ffff352cda2 in WebCore::FrameView::layout (this=0x7fffd8017800, allowSubtree=true) at ../../Source/WebCore/page/FrameView.cpp:1317
#30 0x00007ffff2ed1413 in WebCore::Document::implicitClose (this=0x7fffd8040fc0) at ../../Source/WebCore/dom/Document.cpp:2498
#31 0x00007ffff33d148b in WebCore::FrameLoader::checkCallImplicitClose (this=0x7fffd97f1098) at ../../Source/WebCore/loader/FrameLoader.cpp:895
#32 0x00007ffff33d11f7 in WebCore::FrameLoader::checkCompleted (this=0x7fffd97f1098) at ../../Source/WebCore/loader/FrameLoader.cpp:841
#33 0x00007ffff33d0f60 in WebCore::FrameLoader::finishedParsing (this=0x7fffd97f1098) at ../../Source/WebCore/loader/FrameLoader.cpp:761
#34 0x00007ffff2eda3ba in WebCore::Document::finishedParsing (this=0x7fffd8040fc0) at ../../Source/WebCore/dom/Document.cpp:4638
#35 0x00007ffff324cd45 in WebCore::HTMLConstructionSite::finishedParsing (this=0x7fffd97e74a0) at ../../Source/WebCore/html/parser/HTMLConstructionSite.cpp:404
#36 0x00007ffff3289862 in WebCore::HTMLTreeBuilder::finished (this=0x7fffd97e7480) at ../../Source/WebCore/html/parser/HTMLTreeBuilder.cpp:2940
#37 0x00007ffff32556e0 in WebCore::HTMLDocumentParser::end (this=0x7fffd8017c80) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:402
#38 0x00007ffff32557ae in WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd (this=0x7fffd8017c80) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:411
#39 0x00007ffff325445e in WebCore::HTMLDocumentParser::prepareToStopParsing (this=0x7fffd8017c80) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:132
#40 0x00007ffff32557e5 in WebCore::HTMLDocumentParser::attemptToEnd (this=0x7fffd8017c80) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:423
#41 0x00007ffff3255893 in WebCore::HTMLDocumentParser::finish (this=0x7fffd8017c80) at ../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:451
#42 0x00007ffff33c1571 in WebCore::DocumentWriter::end (this=0x7fffd801ac20) at ../../Source/WebCore/loader/DocumentWriter.cpp:247
#43 0x00007ffff33acbd1 in WebCore::DocumentLoader::finishedLoading (this=0x7fffd801ab80, finishTime=0) at ../../Source/WebCore/loader/DocumentLoader.cpp:441
#44 0x00007ffff33ac93a in WebCore::DocumentLoader::notifyFinished (this=0x7fffd801ab80, resource=0x7fffd803ca40) at ../../Source/WebCore/loader/DocumentLoader.cpp:375
#45 0x00007ffff3461090 in WebCore::CachedResource::checkNotify (this=0x7fffd803ca40) at ../../Source/WebCore/loader/cache/CachedResource.cpp:293
#46 0x00007ffff346118e in WebCore::CachedResource::finishLoading (this=0x7fffd803ca40) at ../../Source/WebCore/loader/cache/CachedResource.cpp:309
#47 0x00007ffff345d6f5 in WebCore::CachedRawResource::finishLoading (this=0x7fffd803ca40, data=0x7fffd9fc8330) at ../../Source/WebCore/loader/cache/CachedRawResource.cpp:104
#48 0x00007ffff340feb9 in WebCore::SubresourceLoader::didFinishLoading (this=0x7fffd8011000, finishTime=0) at ../../Source/WebCore/loader/SubresourceLoader.cpp:364
#49 0x00007ffff340b7f3 in WebCore::ResourceLoader::didFinishLoading (this=0x7fffd8011000, finishTime=0) at ../../Source/WebCore/loader/ResourceLoader.cpp:542
#50 0x00007ffff3dbe10f in WebCore::readCallback (asyncResult=0x7901f0, data=0x7fffd9fc4000) at ../../Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:1295
#51 0x00007fffeb27c7e6 in async_ready_callback_wrapper (source_object=0x7c72d0, res=0x7901f0, user_data=user_data@entry=0x7fffd9fc4000) at ginputstream.c:523
#52 0x00007fffeb2a20e5 in g_task_return_now (task=0x7901f0) at gtask.c:1077
#53 0x00007fffeb2a2109 in complete_in_idle_cb (task=0x7901f0) at gtask.c:1086
#54 0x00007fffea55aa1d in g_main_dispatch (context=0x478b00) at gmain.c:3064
#55 g_main_context_dispatch (context=context@entry=0x478b00) at gmain.c:3663
#56 0x00007fffea55ad88 in g_main_context_iterate (context=0x478b00, block=block@entry=1, dispatch=dispatch@entry=1, self=&lt;optimized out&gt;) at gmain.c:3734
#57 0x00007fffea55b04a in g_main_loop_run (loop=0x901c90) at gmain.c:3928
#58 0x00007ffff44b7750 in WTF::RunLoop::run () at ../../Source/WTF/wtf/gtk/RunLoopGtk.cpp:59
#59 0x00007ffff29a854c in WebKit::ChildProcessMain&lt;WebKit::WebProcess, WebKit::WebProcessMain&gt; (argc=2, argv=0x7fffffffd948) at ../../Source/WebKit2/Shared/unix/ChildProcessMain.h:61
#60 0x00007ffff29a83b1 in WebKit::WebProcessMainUnix (argc=2, argv=0x7fffffffd948) at ../../Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp:77
#61 0x00000000004008d1 in main (argc=2, argv=0x7fffffffd948) at ../../Source/WebKit2/WebProcess/EntryPoint/unix/WebProcessMain.cpp:44</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217668</commentid>
    <comment_count>1</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2016-08-04 16:56:29 -0700</bug_when>
    <thetext>I don&apos;t see an assertion with this test case, but it does seem to enter an endless loop in r204307.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217669</commentid>
    <comment_count>2</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2016-08-04 17:01:15 -0700</bug_when>
    <thetext>We seem to enter an endless loop in WebCore::maxWordFragmentWidth, in the following code:

    while ((hyphenLocation = lastHyphenLocation(word, hyphenLocation, style.locale())) &gt;= minimumPrefixLength)
        hyphenLocations.append(hyphenLocation);

The &apos;lastHyphenLocation&apos; keeps returning 0, which is &gt;= minimumPrefixLength (which is also zero), and we never get out of the loop.

This problem seems like it&apos;s been around for a few years.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217670</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-08-04 17:04:31 -0700</bug_when>
    <thetext>&lt;rdar://problem/27710431&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1389644</commentid>
    <comment_count>4</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2018-01-16 11:28:03 -0800</bug_when>
    <thetext>This appears to no longer happen in r226920</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>246652</attachid>
            <date>2015-02-16 07:37:02 -0800</date>
            <delta_ts>2015-02-16 07:37:02 -0800</delta_ts>
            <desc>Test case</desc>
            <filename>crash.html</filename>
            <type>text/html</type>
            <size>326</size>
            <attacher name="Renata Hodovan">rhodovan.u-szeged</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxzdHlsZT4KKiB7CiAgICBsZXR0ZXItc3BhY2luZzogMjgyMXZtaW47
CiAgICB6b29tOiA3ODIzOwp9Cjwvc3R5bGU+Cjxmb3JtPgogICAgPHNtYWxsPgogICAgICAgIDxh
YmJyPgogICAgICAgICAgICA8bWFyaz4KICAgICAgICAgICAgICAgIDxycD4KICAgICAgICAgICAg
ICAgICAgICA8bGFiZWw+CiAgICAgICAgICAgICAgICAgICAgICAgIDxxPjwvcT4KICAgICAgICAg
ICAgICAgICAgICA8L2xhYmVsPgogICAgICAgICAgICAgICAgPC9ycD4KICAgICAgICAgICAgPC9t
YXJrPgogICAgICAgIDwvYWJicj4KICAgIDwvc21hbGw+CjwvZm9ybT4=
</data>

          </attachment>
      

    </bug>

</bugzilla>