From 7cedf53019458856f43fa88e9a4344b076c6ad5003308e5c4c6ef2be7cb57256 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 5 Aug 2016 15:42:49 +0000 Subject: [PATCH] Accepting request 417120 from home:hpjansson:3.20-factory Sync from SLE12 SP2, take two OBS-URL: https://build.opensuse.org/request/show/417120 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/cairo?expand=0&rev=104 --- ...-deadlock-on-scaled-font-cache-reset.patch | 46 +++++++++++++++++++ cairo.changes | 19 ++++++++ cairo.spec | 5 +- 3 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 cairo-bsc958844-deadlock-on-scaled-font-cache-reset.patch diff --git a/cairo-bsc958844-deadlock-on-scaled-font-cache-reset.patch b/cairo-bsc958844-deadlock-on-scaled-font-cache-reset.patch new file mode 100644 index 0000000..ac7a6e9 --- /dev/null +++ b/cairo-bsc958844-deadlock-on-scaled-font-cache-reset.patch @@ -0,0 +1,46 @@ +diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c +index ac80c97..a22b36e 100644 +--- a/src/cairo-scaled-font.c ++++ b/src/cairo-scaled-font.c +@@ -818,23 +818,35 @@ _cairo_scaled_font_thaw_cache (cairo_scaled_font_t *scaled_font) + void + _cairo_scaled_font_reset_cache (cairo_scaled_font_t *scaled_font) + { ++ cairo_scaled_glyph_page_t *page; ++ + CAIRO_MUTEX_LOCK (scaled_font->mutex); + assert (! scaled_font->cache_frozen); + assert (! scaled_font->global_cache_frozen); + CAIRO_MUTEX_LOCK (_cairo_scaled_glyph_page_cache_mutex); +- while (! cairo_list_is_empty (&scaled_font->glyph_pages)) { +- cairo_scaled_glyph_page_t *page = +- cairo_list_first_entry (&scaled_font->glyph_pages, +- cairo_scaled_glyph_page_t, +- link); + ++ cairo_list_foreach_entry (page, ++ cairo_scaled_glyph_page_t, ++ &scaled_font->glyph_pages, ++ link) { + cairo_scaled_glyph_page_cache.size -= page->cache_entry.size; + _cairo_hash_table_remove (cairo_scaled_glyph_page_cache.hash_table, + (cairo_hash_entry_t *) &page->cache_entry); ++ } + ++ CAIRO_MUTEX_UNLOCK (_cairo_scaled_glyph_page_cache_mutex); ++ ++ /* Destroy scaled_font's pages while holding its lock only, and not the ++ * global page cache lock. The destructor can cause us to recurse and ++ * end up back here for a different scaled_font. */ ++ ++ while (! cairo_list_is_empty (&scaled_font->glyph_pages)) { ++ page = cairo_list_first_entry (&scaled_font->glyph_pages, ++ cairo_scaled_glyph_page_t, ++ link); + _cairo_scaled_glyph_page_destroy (scaled_font, page); + } +- CAIRO_MUTEX_UNLOCK (_cairo_scaled_glyph_page_cache_mutex); ++ + CAIRO_MUTEX_UNLOCK (scaled_font->mutex); + } + diff --git a/cairo.changes b/cairo.changes index cd76179..404fff1 100644 --- a/cairo.changes +++ b/cairo.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Wed Jul 20 21:23:25 CEST 2016 - hpj@suse.com + +- Add back cairo-bsc958844-deadlock-on-scaled-font-cache-reset.patch + (bsc#958844, fdo#93891). This is still not fixed upstream. + +------------------------------------------------------------------- +Wed Apr 13 08:08:36 UTC 2016 - idonmez@suse.com + +- Update to GNOME 3.20 Fate#318572 +- Remove patch: + cairo-bsc958844-deadlock-on-scaled-font-cache-reset.patch. + +------------------------------------------------------------------- +Mon Dec 21 21:53:52 CET 2015 - hpj@suse.com + +- Add cairo-bsc958844-deadlock-on-scaled-font-cache-reset.patch + to fix mutex deadlocks on certain documents (bsc#958844). + ------------------------------------------------------------------- Sun Dec 13 22:26:26 UTC 2015 - zaitor@opensuse.org diff --git a/cairo.spec b/cairo.spec index 7d67fbc..3bbbc58 100644 --- a/cairo.spec +++ b/cairo.spec @@ -1,7 +1,7 @@ # # spec file for package cairo # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,6 +31,8 @@ Source99: baselibs.conf Patch0: cairo-modules-no-version.patch # PATCH-FIX-UPSTREAM cairo-xlib-endianness.patch fdo#63461 bnc#882951 fcrozat@suse.com -- Fix crash when client and server have different endianness Patch2: cairo-xlib-endianness.patch +# PATCH-FIX-UPSTREAM cairo-bsc958844-deadlock-on-scaled-font-cache-reset.patch fdo#93891 bsc#958844 hpj@suse.com -- Fix mutex deadlock on certain documents. +Patch3: cairo-bsc958844-deadlock-on-scaled-font-cache-reset.patch BuildRequires: gtk-doc # Needed by patch0 BuildRequires: libtool @@ -140,6 +142,7 @@ cairo. %setup -q %patch0 -p1 %patch2 -p1 +%patch3 -p1 %build # Needed by patch0 and patch1