<?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>115586</bug_id>
          
          <creation_ts>2013-05-04 03:37:24 -0700</creation_ts>
          <short_desc>[GTK] Memory leaks in WebCore::FontCache::createFontPlatformData</short_desc>
          <delta_ts>2013-07-04 04:41:47 -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>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Eduardo Lima Mitev">elima</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>magomez</cc>
    
    <cc>rego</cc>
    
    <cc>svillar</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>884521</commentid>
    <comment_count>0</comment_count>
    <who name="Eduardo Lima Mitev">elima</who>
    <bug_when>2013-05-04 03:37:24 -0700</bug_when>
    <thetext>Valgrind traces show memory being lost in WebCore::FontCache::createFontPlatformData when calling FcFontMatch() and not freeing the returned FcPattern.

There are several traces with different stack paths, but all end with this pattern:

==28564== 1,424 (512 direct, 912 indirect) bytes in 1 blocks are definitely lost in loss record 6,376 of 6,599
==28564==    at 0x4C28CCE: realloc (vg_replace_malloc.c:632)
==28564==    by 0x78B5A57: FcPatternObjectInsertElt (fcpat.c:358)
==28564==    by 0x78B68E7: FcPatternObjectAddWithBinding (fcpat.c:507)
==28564==    by 0x78B34B7: FcFontRenderPrepare (fcmatch.c:416)
==28564==    by 0x78B36CC: FcFontMatch (fcmatch.c:553)
==28564==    by 0x627F969: WebCore::FontCache::createFontPlatformData(WebCore::FontDescription const&amp;, WTF::AtomicString const&amp;) (in /opt/jhbuild/gnome3/checkout/WebKit/WebKitBuild/Release/.libs/libwebkit2gtk-3.0.so.0.21.0)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>904622</commentid>
    <comment_count>1</comment_count>
    <who name="Miguel Gomez">magomez</who>
    <bug_when>2013-06-28 07:52:19 -0700</bug_when>
    <thetext>This seems to be a problem in fontconfig and not in WebKit. This very same issue was reported several times in its bugzilla (being this the last one https://bugs.freedesktop.org/show_bug.cgi?id=34208) and it seems to be a false positive and not a leak.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>906135</commentid>
    <comment_count>2</comment_count>
    <who name="Sergio Villar Senin">svillar</who>
    <bug_when>2013-07-04 04:41:47 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; This seems to be a problem in fontconfig and not in WebKit. This very same issue was reported several times in its bugzilla (being this the last one https://bugs.freedesktop.org/show_bug.cgi?id=34208) and it seems to be a false positive and not a leak.

Indeed it was also closed as NOTABUG here https://bugs.freedesktop.org/show_bug.cgi?id=8215. There is an ongoing patch adding valgrind suppressions which already contains this false positive.

Let&apos;s close this then.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>