Re: [PATCH] scaled-font: Hold the scaled font mutex whilst reaping from the global cache

Chris Wilson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On Tue, 08 Jan 2013 23:29:02 +1030, Adrian Johnson <[email protected]> wrote:
> I tested the patch with the test case in bug 54950 and got this:
> 
> cairo-scaled-font.c:464: _cairo_scaled_glyph_page_destroy: Assertion
> `!scaled_font->global_cache_frozen' failed.
> Aborted

Which turned out to be a different bug, where we leaked the frozen_count
on the global glyph cache, effectively allowing us to hold open all
glyphs for all fonts.

commit 44a093eb95c950b0e8f2d7d1cdb9719cb8a550f7
Author: Chris Wilson <[email protected]>
Date:   Tue Jan 8 14:58:41 2013 +0000

    scaled-font: Always hold the mutex even for single glyph probes

Then the deadlock was indeed a recursion through a recording_surface
beneath the glyph:

commit 4d4bf8fddff49d349e03282ffa827f6f4659e3fe
Author: Chris Wilson <[email protected]>
Date:   Tue Jan 8 14:56:07 2013 +0000

    scaled-font: Free the cached glyphs from the font before taking the
global lock

And I added more assertions to make sure we don't leak the global glyph
cache again. Thanks,
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.