[cairo-bugs] [Bug 50705] cairo_glyph_path is not multithread safe

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jun 7 01:29:30 PDT 2012


https://bugs.freedesktop.org/show_bug.cgi?id=50705

--- Comment #3 from zadecn <zhaohongchao at gmail.com> 2012-06-07 01:29:30 PDT ---
(In reply to comment #1)
> Silly question, can you please test:
> 
> diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
> index 59440b2..2f4dbfe 100644
> --- a/src/cairo-scaled-font.c
> +++ b/src/cairo-scaled-font.c
> @@ -2861,8 +2861,10 @@ _cairo_scaled_font_free_last_glyph (cairo_scaled_font_t
> *scaled_font,
>      _cairo_scaled_glyph_fini (scaled_font, scaled_glyph);
> 
>      if (--page->num_glyphs == 0) {
> +    CAIRO_MUTEX_LOCK (_cairo_scaled_glyph_page_cache_mutex);
>      _cairo_cache_remove (&cairo_scaled_glyph_page_cache,
>                       &page->cache_entry);
> +    CAIRO_MUTEX_UNLOCK (_cairo_scaled_glyph_page_cache_mutex);
>      }
>  }
I test it with the lock, but it cores also

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


More information about the cairo-bugs mailing list