<?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>22970</bug_id>
          
          <creation_ts>2008-12-22 16:06:37 -0800</creation_ts>
          <short_desc>[Gtk] FontConfig leaks in FontCacheGtk</short_desc>
          <delta_ts>2010-10-04 15:09:32 -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>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</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="Julien Chaffraix">jchaffraix</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>mario.bensi</cc>
    
    <cc>mrobinson</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103247</commentid>
    <comment_count>0</comment_count>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2008-12-22 16:06:37 -0800</bug_when>
    <thetext>While looking for leaks in WebCore, we have found lots of leaks in FontPlatformData. Here are 2 valgrind trace for 2 leaks (maybe related):

==8392== 8,384 bytes in 524 blocks are definitely lost in loss record 6,428 of 9,493
==8392==    at 0x4023D6E: malloc (vg_replace_malloc.c:207)
==8392==    by 0x63CFC3D: FcPatternCreate (in /home/julien/MyLibs/lib/libfontconfig.so.1.3.0)
==8392==    by 0x63CD23E: FcFontRenderPrepare (in /home/julien/MyLibs/lib/libfontconfig.so.1.3.0)
==8392==    by 0x4716249: WebCore::FontCache::getFontDataForCharacters(WebCore::Font const&amp;, unsigned short const*, int) (FontCacheGtk.cpp:48)
==8392==    by 0x442ECDC: WebCore::Font::glyphDataForCharacter(int, bool, bool) const (FontFastPath.cpp:147)
==8392==    by 0x4444E22: WebCore::WidthIterator::advance(int, WebCore::GlyphBuffer*) (WidthIterator.cpp:112)
==8392==    by 0x442E0F9: WebCore::Font::floatWidthForSimpleText(WebCore::TextRun const&amp;, WebCore::GlyphBuffer*) const (FontFastPath.cpp:303)
==8392==    by 0x441F7DF: WebCore::Font::floatWidth(WebCore::TextRun const&amp;) const (Font.cpp:249)
==8392==    by 0x441F827: WebCore::Font::width(WebCore::TextRun const&amp;) const (Font.cpp:173)
==8392==    by 0x453CFC0: WebCore::RenderText::widthFromCache(WebCore::Font const&amp;, int, int, int) const (RenderText.cpp:432)
==8392==    by 0x453949B: WebCore::RenderText::width(unsigned, unsigned, WebCore::Font const&amp;, int) const (RenderText.cpp:1056)
==8392==    by 0x455DFD9: WebCore::RenderBlock::findNextLineBreak(WebCore::BidiResolver&lt;WebCore::InlineIterator, WebCore::BidiRun&gt;&amp;, WebCore::EClear*) (bidi.cpp:1869)
==8392==    by 0x4560D14: WebCore::RenderBlock::layoutInlineChildren(bool, int&amp;, int&amp;) (bidi.cpp:947)
==8392==    by 0x44AD7FC: WebCore::RenderBlock::layoutBlock(bool) (RenderBlock.cpp:655)
==8392==    by 0x449B4CB: WebCore::RenderBlock::layout() (RenderBlock.cpp:568)
==8392==    by 0x45003DF: WebCore::RenderListItem::layout() (RenderListItem.cpp:232)
==8392==    by 0x44AC441: WebCore::RenderBlock::layoutBlockChildren(bool, int&amp;) (RenderBlock.cpp:1330)
==8392==    by 0x44AD81E: WebCore::RenderBlock::layoutBlock(bool) (RenderBlock.cpp:657)
==8392==    by 0x449B4CB: WebCore::RenderBlock::layout() (RenderBlock.cpp:568)
==8392==    by 0x44AC441: WebCore::RenderBlock::layoutBlockChildren(bool, int&amp;) (RenderBlock.cpp:1330)
==8392==    by 0x44AD81E: WebCore::RenderBlock::layoutBlock(bool) (RenderBlock.cpp:657)
==8392==    by 0x449B4CB: WebCore::RenderBlock::layout() (RenderBlock.cpp:568)
==8392==    by 0x44AC441: WebCore::RenderBlock::layoutBlockChildren(bool, int&amp;) (RenderBlock.cpp:1330)
==8392==    by 0x44AD81E: WebCore::RenderBlock::layoutBlock(bool) (RenderBlock.cpp:657)
==8392==    by 0x449B4CB: WebCore::RenderBlock::layout() (RenderBlock.cpp:568)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286574</commentid>
    <comment_count>1</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2010-09-28 15:24:37 -0700</bug_when>
    <thetext>It looks like  recent code changes may have fixed this leak. Can you confirm?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>289187</commentid>
    <comment_count>2</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2010-10-04 15:09:32 -0700</bug_when>
    <thetext>Closing as I think this leak is gone. Feel free to re-open if you still observe it.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>