Bug 22970 - [Gtk] FontConfig leaks in FontCacheGtk
Summary: [Gtk] FontConfig leaks in FontCacheGtk
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2008-12-22 16:06 PST by Julien Chaffraix
Modified: 2010-10-04 15:09 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Chaffraix 2008-12-22 16:06:37 PST
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&, 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&, WebCore::GlyphBuffer*) const (FontFastPath.cpp:303)
==8392==    by 0x441F7DF: WebCore::Font::floatWidth(WebCore::TextRun const&) const (Font.cpp:249)
==8392==    by 0x441F827: WebCore::Font::width(WebCore::TextRun const&) const (Font.cpp:173)
==8392==    by 0x453CFC0: WebCore::RenderText::widthFromCache(WebCore::Font const&, int, int, int) const (RenderText.cpp:432)
==8392==    by 0x453949B: WebCore::RenderText::width(unsigned, unsigned, WebCore::Font const&, int) const (RenderText.cpp:1056)
==8392==    by 0x455DFD9: WebCore::RenderBlock::findNextLineBreak(WebCore::BidiResolver<WebCore::InlineIterator, WebCore::BidiRun>&, WebCore::EClear*) (bidi.cpp:1869)
==8392==    by 0x4560D14: WebCore::RenderBlock::layoutInlineChildren(bool, int&, int&) (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&) (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&) (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&) (RenderBlock.cpp:1330)
==8392==    by 0x44AD81E: WebCore::RenderBlock::layoutBlock(bool) (RenderBlock.cpp:657)
==8392==    by 0x449B4CB: WebCore::RenderBlock::layout() (RenderBlock.cpp:568)
Comment 1 Martin Robinson 2010-09-28 15:24:37 PDT
It looks like  recent code changes may have fixed this leak. Can you confirm?
Comment 2 Martin Robinson 2010-10-04 15:09:32 PDT
Closing as I think this leak is gone. Feel free to re-open if you still observe it.