<?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>166058</bug_id>
          
          <creation_ts>2016-12-20 06:20:45 -0800</creation_ts>
          <short_desc>[Cairo] Conditional jump or move depends on uninitialised value(s)</short_desc>
          <delta_ts>2017-01-04 23:29:02 -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>WebKit Local 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>Gtk</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Garcia Campos">cgarcia</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>commit-queue</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>mmaxfield</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1261368</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2016-12-20 06:20:45 -0800</bug_when>
    <thetext>==25564== Conditional jump or move depends on uninitialised value(s)
==25564==    at 0x9A72001: _cairo_gstate_transform_glyphs_to_backend (cairo-gstate.c:2198)
==25564==    by 0x9A757BC: _cairo_gstate_glyph_path (cairo-gstate.c:2085)
==25564==    by 0x9A678A1: cairo_glyph_path (cairo.c:3555)
==25564==    by 0x71DA2EE: WebCore::CairoGlyphToPathTranslator::path() (in /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37.16.0)
==25564==    by 0x71DB01A: WebCore::FontCascade::dashesForIntersectionsWithRect(WebCore::TextRun const&amp;, WebCore::FloatPoint const&amp;, WebCore::FloatRect const&amp;) const (in /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37.16.0)
==25564==    by 0x6F19C58: WebCore::drawSkipInkUnderline(WebCore::GraphicsContext&amp;, WebCore::FontCascade const&amp;, WebCore::TextRun const&amp;, WebCore::FloatPoint const&amp;, WebCore::FloatPoint const&amp;, float, float, bool, bool, WebCore::StrokeStyle) (in /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37.16.0)
==25564==    by 0x6F1B01A: WebCore::TextDecorationPainter::paintTextDecoration(WebCore::TextRun const&amp;, WebCore::FloatPoint const&amp;, WebCore::FloatPoint const&amp;) (in /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37.16.0)
==25564==    by 0x6D4BE6B: WebCore::InlineTextBox::paintDecoration(WebCore::GraphicsContext&amp;, WebCore::FontCascade const&amp;, WebCore::RenderCombineText*, WebCore::TextRun const&amp;, WebCore::FloatPoint const&amp;, WebCore::FloatRect const&amp;, WebCore::TextDecoration, WebCore::TextPaintStyle, WebCore::ShadowData const*) (in /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37.16.0)
==25564==    by 0x6D509CC: WebCore::InlineTextBox::paint(WebCore::PaintInfo&amp;, WebCore::LayoutPoint const&amp;, WebCore::LayoutUnit, WebCore::LayoutUnit) (in /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37.16.0)
==25564==    by 0x6D495B7: WebCore::InlineFlowBox::paint(WebCore::PaintInfo&amp;, WebCore::LayoutPoint const&amp;, WebCore::LayoutUnit, WebCore::LayoutUnit) (in /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37.16.0)
==25564==    by 0x6D495B7: WebCore::InlineFlowBox::paint(WebCore::PaintInfo&amp;, WebCore::LayoutPoint const&amp;, WebCore::LayoutUnit, WebCore::LayoutUnit) (in /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37.16.0)
==25564==    by 0x6D495B7: WebCore::InlineFlowBox::paint(WebCore::PaintInfo&amp;, WebCore::LayoutPoint const&amp;, WebCore::LayoutUnit, WebCore::LayoutUnit) (in /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37.16.0)
==25564==  Uninitialised value was created by a stack allocation
==25564==    at 0x5E3C720: ??? (in /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37.16.0)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1261369</commentid>
    <comment_count>1</comment_count>
      <attachid>297518</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2016-12-20 06:22:52 -0800</bug_when>
    <thetext>Created attachment 297518
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1261373</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-12-20 06:49:17 -0800</bug_when>
    <thetext>It reminds me of https://bugs.freedesktop.org/show_bug.cgi?id=91271, which is very annoying when valgrinding as it happens every time when loading any page. But clearly this is a separate issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1261912</commentid>
    <comment_count>3</comment_count>
      <attachid>297518</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-12-20 23:49:18 -0800</bug_when>
    <thetext>Comment on attachment 297518
Patch

Clearing flags on attachment: 297518

Committed r210056: &lt;http://trac.webkit.org/changeset/210056&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1261913</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-12-20 23:49:23 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1263811</commentid>
    <comment_count>5</comment_count>
      <attachid>297518</attachid>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2017-01-04 10:24:18 -0800</bug_when>
    <thetext>Comment on attachment 297518
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=297518&amp;action=review

&gt; Source/WebCore/platform/graphics/cairo/FontCairo.cpp:246
&gt;      cairo_glyph_t cairoGlyph;
&gt;      cairoGlyph.index = m_glyphBuffer.glyphAt(m_index);
&gt; +    cairoGlyph.x = cairoGlyph.y = 0;

These could have been written like this:

cairo_glyph_t cairoGlyph = { m_glyphBuffer.glyphAt(m_index), 0, 0 };</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1264028</commentid>
    <comment_count>6</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-01-04 23:29:02 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; Comment on attachment 297518 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=297518&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/platform/graphics/cairo/FontCairo.cpp:246
&gt; &gt;      cairo_glyph_t cairoGlyph;
&gt; &gt;      cairoGlyph.index = m_glyphBuffer.glyphAt(m_index);
&gt; &gt; +    cairoGlyph.x = cairoGlyph.y = 0;
&gt; 
&gt; These could have been written like this:
&gt; 
&gt; cairo_glyph_t cairoGlyph = { m_glyphBuffer.glyphAt(m_index), 0, 0 };

Indeed! Done in r210321, thanks.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>297518</attachid>
            <date>2016-12-20 06:22:52 -0800</date>
            <delta_ts>2016-12-20 23:49:18 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>wcore-cairo-glyphs.diff</filename>
            <type>text/plain</type>
            <size>1366</size>
            <attacher name="Carlos Garcia Campos">cgarcia</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZwppbmRleCAyOTdlNWQ1YzRkMS4uZDRhNWRkY2E4YTggMTAwNjQ0Ci0tLSBhL1NvdXJj
ZS9XZWJDb3JlL0NoYW5nZUxvZworKysgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKQEAgLTEs
MyArMSwxNSBAQAorMjAxNi0xMi0yMCAgQ2FybG9zIEdhcmNpYSBDYW1wb3MgIDxjZ2FyY2lhQGln
YWxpYS5jb20+CisKKyAgICAgICAgW0NhaXJvXSBDb25kaXRpb25hbCBqdW1wIG9yIG1vdmUgZGVw
ZW5kcyBvbiB1bmluaXRpYWxpc2VkIHZhbHVlKHMpCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJr
aXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xNjYwNTgKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JP
RFkgKE9PUFMhKS4KKworICAgICAgICBJbml0aWFsaXplIHggYW5kIHkgbWVtYmVycyBvZiBjYWly
b19nbHlwaF90IHN0cnVjdCBiZWZvcmUgcGFzc2luZyBpdCB0byBjYWlyb19nbHlwaF9wYXRoLgor
CisgICAgICAgICogcGxhdGZvcm0vZ3JhcGhpY3MvY2Fpcm8vRm9udENhaXJvLmNwcDoKKyAgICAg
ICAgKFdlYkNvcmU6OkNhaXJvR2x5cGhUb1BhdGhUcmFuc2xhdG9yOjpwYXRoKToKKwogMjAxNi0x
Mi0xOSAgRGVhbiBKYWNrc29uICA8ZGlub0BhcHBsZS5jb20+CiAKICAgICAgICAgVXNlIEVOQU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