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

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jun 5 23:17:11 PDT 2012


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

--- Comment #2 from zadecn <zhaohongchao at gmail.com> 2012-06-05 23:17:11 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);
>      }
>  }

add lock will avoid core? why not add directly other than a patch?

-- 
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