<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [HarfBuzz] HarfBuzzShaper should not assume numGlyphs is greater than 0"
   href="https://bugs.webkit.org/show_bug.cgi?id=164500">164500</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[HarfBuzz] HarfBuzzShaper should not assume numGlyphs is greater than 0
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Platform
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>Hironori.Fujii&#64;sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>bashi&#64;chromium.org, d-r&#64;roettsches.de
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=294113" name="attach_294113" title="test.html">attachment 294113</a> <a href="attachment.cgi?id=294113&amp;action=edit" title="test.html">[details]</a></span>
test.html

The result of shaping can be no glyphs because 
hb_ot_hide_default_ignorables deletes ignorable glyphs.
<a href="https://github.com/behdad/harfbuzz/blob/1.3.3/src/hb-ot-shape.cc#L470">https://github.com/behdad/harfbuzz/blob/1.3.3/src/hb-ot-shape.cc#L470</a>

<span class="quote">&gt; Thread 1 &quot;WebKitWebProces&quot; received signal SIGSEGV, Segmentation fault.
&gt; 0x00007fe52f765afd in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:323
&gt; 323            *(int *)(uintptr_t)0xbbadbeef = 0;
&gt; (gdb) bt
&gt; #0  0x00007fe52f765afd in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:323
&gt; #1  0x00007fe5358b0912 in WTF::CrashOnOverflow::crash () at ../../Source/WTF/wtf/CheckedArithmetic.h:85
&gt; #2  0x00007fe5358b0909 in WTF::CrashOnOverflow::overflowed () at ../../Source/WTF/wtf/CheckedArithmetic.h:78
&gt; #3  0x00007fe5378784b9 in WTF::Vector&lt;unsigned short, 256ul, WTF::CrashOnOverflow, 16ul&gt;::at (this=0x1f13fe0, i=0) at ../../Source/WTF/wtf/Vector.h:655
&gt; #4  0x00007fe5378779fd in WTF::Vector&lt;unsigned short, 256ul, WTF::CrashOnOverflow, 16ul&gt;::operator[] (this=0x1f13fe0, i=0) at ../../Source/WTF/wtf/Vector.h:675
&gt; #5  0x00007fe537877767 in (anonymous namespace)::HarfBuzzShaper::HarfBuzzRun::glyphToCharacterIndexes (this=0x1f139a0)
&gt;     at ../../Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.h:83
&gt; #6  0x00007fe53787659b in (anonymous namespace)::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun (this=0x7ffc87c51300, currentRun=0x1f139a0, harfBuzzBuffer=
&gt;     0x1ec7850) at ../../Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp:517
&gt; #7  0x00007fe537876473 in (anonymous namespace)::HarfBuzzShaper::shapeHarfBuzzRuns (this=0x7ffc87c51300, shouldSetDirection=false)
&gt;     at ../../Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp:502
&gt; #8  0x00007fe537875901 in (anonymous namespace)::HarfBuzzShaper::shape (this=0x7ffc87c51300, glyphBuffer=0x0)
&gt;     at ../../Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp:376
&gt; #9  0x00007fe53785690a in (anonymous namespace)::FontCascade::floatWidthForComplexText (this=0x7fe516756678, run=...)
&gt;     at ../../Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:73
&gt; #10 0x00007fe53704bae4 in (anonymous namespace)::FontCascade::width (this=0x7fe516756678, run=..., fallbackFonts=0x7ffc87c51d48, glyphOverflow=0x7ffc87c51540)
&gt;     at ../../Source/WebCore/platform/graphics/FontCascade.cpp:371
&gt; #11 0x00007fe53744c883 in (anonymous namespace)::textWidth (text=..., from=1, len=3, font=..., xPos=0, isFixedPitch=false, collapseWhiteSpace=true, 
&gt;     fallbackFonts=..., layout=0x0) at ../../Source/WebCore/rendering/line/BreakingContext.h:654
&gt; #12 0x00007fe53744d148 in (anonymous namespace)::BreakingContext::computeAdditionalBetweenWordsWidth (this=0x7ffc87c51af0, renderText=..., textLayout=0x0, 
&gt;     currentCharacter=10, wordTrailingSpace=..., fallbackFonts=..., wordMeasurements=..., font=..., isFixedPitch=false, lastSpace=1, lastSpaceWordSpacing=0, 
&gt;     wordSpacingForWordMeasurement=0, offset=4) at ../../Source/WebCore/rendering/line/BreakingContext.h:749
&gt; #13 0x00007fe53744ea62 in (anonymous namespace)::BreakingContext::handleText (this=0x7ffc87c51af0, wordMeasurements=..., hyphenated=&#64;0x7ffc87c52dc8: false, 
&gt;     consecutiveHyphenatedLines=&#64;0x7ffc87c51cb8: 0) at ../../Source/WebCore/rendering/line/BreakingContext.h:913
&gt; #14 0x00007fe537448bb9 in (anonymous namespace)::LineBreaker::nextLineBreak (this=0x7ffc87c52dc0, resolver=..., lineInfo=..., layoutState=..., renderTextInfo=..., 
&gt;     lastFloatFromPreviousLine=0x0, consecutiveHyphenatedLines=0, wordMeasurements=...) at ../../Source/WebCore/rendering/line/LineBreaker.cpp:110
&gt; #15 0x00007fe53723120a in (anonymous namespace)::RenderBlockFlow::layoutRunsAndFloatsInRange (this=0x7fe51671b990, layoutState=..., resolver=..., 
&gt;     cleanLineStart=..., cleanLineBidiStatus=..., consecutiveHyphenatedLines=0) at ../../Source/WebCore/rendering/RenderBlockLineLayout.cpp:1368
&gt; #16 0x00007fe537230e09 in (anonymous namespace)::RenderBlockFlow::layoutRunsAndFloats (this=0x7fe51671b990, layoutState=..., hasInlineChild=true)
&gt;     at ../../Source/WebCore/rendering/RenderBlockLineLayout.cpp:1321
&gt; #17 0x00007fe537233581 in (anonymous namespace)::RenderBlockFlow::layoutLineBoxes (this=0x7fe51671b990, relayoutChildren=false, repaintLogicalTop=..., 
&gt;     repaintLogicalBottom=...) at ../../Source/WebCore/rendering/RenderBlockLineLayout.cpp:1747
&gt; #18 0x00007fe537210fbd in (anonymous namespace)::RenderBlockFlow::layoutInlineChildren (this=0x7fe51671b990, relayoutChildren=false, repaintLogicalTop=..., 
&gt;     repaintLogicalBottom=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:651
&gt; #19 0x00007fe537210344 in (anonymous namespace)::RenderBlockFlow::layoutBlock (this=0x7fe51671b990, relayoutChildren=false, pageLogicalHeight=...)
&gt;     at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:485
&gt; #20 0x00007fe5371dde8a in (anonymous namespace)::RenderBlock::layout (this=0x7fe51671b990) at ../../Source/WebCore/rendering/RenderBlock.cpp:1072
&gt; #21 0x00007fe53721137e in (anonymous namespace)::RenderBlockFlow::layoutBlockChild (this=0x7fe51671b880, child=..., marginInfo=..., 
&gt;     previousFloatLogicalBottom=..., maxFloatLogicalBottom=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:709
&gt; #22 0x00007fe537210ed7 in (anonymous namespace)::RenderBlockFlow::layoutBlockChildren (this=0x7fe51671b880, relayoutChildren=false, maxFloatLogicalBottom=...)
&gt;     at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:632
&gt; #23 0x00007fe537210368 in (anonymous namespace)::RenderBlockFlow::layoutBlock (this=0x7fe51671b880, relayoutChildren=false, pageLogicalHeight=...)
&gt;     at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:487
&gt; #24 0x00007fe5371dde8a in (anonymous namespace)::RenderBlock::layout (this=0x7fe51671b880) at ../../Source/WebCore/rendering/RenderBlock.cpp:1072
&gt; #25 0x00007fe53721137e in (anonymous namespace)::RenderBlockFlow::layoutBlockChild (this=0x7fe4d4bf2b00, child=..., marginInfo=..., 
&gt;     previousFloatLogicalBottom=..., maxFloatLogicalBottom=...) at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:709
&gt; #26 0x00007fe537210ed7 in (anonymous namespace)::RenderBlockFlow::layoutBlockChildren (this=0x7fe4d4bf2b00, relayoutChildren=false, maxFloatLogicalBottom=...)
&gt;     at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:632
&gt; #27 0x00007fe537210368 in (anonymous namespace)::RenderBlockFlow::layoutBlock (this=0x7fe4d4bf2b00, relayoutChildren=false, pageLogicalHeight=...)
&gt;     at ../../Source/WebCore/rendering/RenderBlockFlow.cpp:487
&gt; #28 0x00007fe5371dde8a in (anonymous namespace)::RenderBlock::layout (this=0x7fe4d4bf2b00) at ../../Source/WebCore/rendering/RenderBlock.cpp:1072
&gt; #29 0x00007fe537408af5 in (anonymous namespace)::RenderView::layoutContent (this=0x7fe4d4bf2b00, state=...) at ../../Source/WebCore/rendering/RenderView.cpp:244
&gt; #30 0x00007fe537409219 in (anonymous namespace)::RenderView::layout (this=0x7fe4d4bf2b00) at ../../Source/WebCore/rendering/RenderView.cpp:370
&gt; #31 0x00007fe536ea224b in (anonymous namespace)::FrameView::layout (this=0x7fe51678ba00, allowSubtree=true) at ../../Source/WebCore/page/FrameView.cpp:1461
&gt; #32 0x00007fe536eac117 in (anonymous namespace)::FrameView::updateLayoutAndStyleIfNeededRecursive (this=0x7fe51678ba00)
&gt;     at ../../Source/WebCore/page/FrameView.cpp:4288
&gt; #33 0x00007fe535fc91fc in (anonymous namespace)::CompositingCoordinator::syncDisplayState (this=0x7fe5167d0338)
&gt;     at ../../Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:155
&gt; #34 0x00007fe535fd571f in (anonymous namespace)::CoordinatedLayerTreeHost::layerFlushTimerFired (this=0x7fe5167d0300)
&gt;     at ../../Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:165
&gt; #35 0x00007fe535fd5cb4 in WTF::RunLoop::Timer&lt;WebKit::CoordinatedLayerTreeHost&gt;::fired (this=0x7fe5167d0528) at ../../Source/WTF/wtf/RunLoop.h:145
&gt; #36 0x00007fe52f7cb5f3 in WTF::RunLoop::TimerBase::&lt;lambda(gpointer)&gt;::operator()(gpointer) const (__closure=0x0, userData=0x7fe5167d0528)
&gt;     at ../../Source/WTF/wtf/glib/RunLoopGLib.cpp:162
&gt; #37 0x00007fe52f7cb62f in WTF::RunLoop::TimerBase::&lt;lambda(gpointer)&gt;::_FUN(gpointer) () at ../../Source/WTF/wtf/glib/RunLoopGLib.cpp:166
&gt; #38 0x00007fe52f7cac56 in WTF::&lt;lambda(GSource*, GSourceFunc, gpointer)&gt;::operator()(GSource *, GSourceFunc, gpointer) const (__closure=0x0, source=0x1c59d90, 
&gt;     callback=0x7fe52f7cb612 &lt;WTF::RunLoop::TimerBase::&lt;lambda(gpointer)&gt;::_FUN(gpointer)&gt;, userData=0x7fe5167d0528) at ../../Source/WTF/wtf/glib/RunLoopGLib.cpp:44
&gt; #39 0x00007fe52f7cac85 in WTF::&lt;lambda(GSource*, GSourceFunc, gpointer)&gt;::_FUN(GSource *, GSourceFunc, gpointer) () at ../../Source/WTF/wtf/glib/RunLoopGLib.cpp:45
&gt; #40 0x00007fe52702754a in g_main_dispatch () at /home/fujii/work/webkit/w2/WebKitBuild/DependenciesGTK/Source/glib-2.44.1/glib/gmain.c:3122
&gt; #41 g_main_context_dispatch () at /home/fujii/work/webkit/w2/WebKitBuild/DependenciesGTK/Source/glib-2.44.1/glib/gmain.c:3737
&gt; #42 0x00007fe5270278c8 in g_main_context_iterate () at /home/fujii/work/webkit/w2/WebKitBuild/DependenciesGTK/Source/glib-2.44.1/glib/gmain.c:3808
&gt; #43 0x00007fe527027be2 in g_main_loop_run () at /home/fujii/work/webkit/w2/WebKitBuild/DependenciesGTK/Source/glib-2.44.1/glib/gmain.c:4002
&gt; #44 0x00007fe52f7cb236 in WTF::RunLoop::run () at ../../Source/WTF/wtf/glib/RunLoopGLib.cpp:94
&gt; #45 0x00007fe535f98a72 in (anonymous namespace)::ChildProcessMain&lt;WebKit::WebProcess, WebKit::WebProcessMain&gt; (argc=2, argv=0x7ffc87c54d78)
&gt;     at ../../Source/WebKit2/Shared/unix/ChildProcessMain.h:61
&gt; #46 0x00007fe535f98920 in (anonymous namespace)::WebProcessMainUnix (argc=2, argv=0x7ffc87c54d78) at ../../Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp:69
&gt; #47 0x0000000000400c7a in main (argc=2, argv=0x7ffc87c54d78) at ../../Source/WebKit2/WebProcess/EntryPoint/unix/WebProcessMain.cpp:44
&gt; (gdb)</span ></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>