Bug 22970
| Summary: | [Gtk] FontConfig leaks in FontCacheGtk | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Julien Chaffraix <jchaffraix> |
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | mario.bensi, mrobinson |
| Priority: | P2 | Keywords: | Gtk |
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | Linux | ||
Julien Chaffraix
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)
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Martin Robinson
It looks like recent code changes may have fixed this leak. Can you confirm?
Martin Robinson
Closing as I think this leak is gone. Feel free to re-open if you still observe it.