tetromino 14/05/02 21:51:12
Added: cairo-1.12.16-all-clipped-3.patch
cairo-1.12.16-all-clipped-2.patch
cairo-1.12.16-all-clipped-1.patch
cairo-1.12.16-lto-optional.patch
Log:
Fix firefox crash (bug #507478, thanks to Jaak Ristioja and Patrice
Levesque). Make lto optional (but enabled by default because cairo is a
performance-critical library) and check for enough memory for it (bug #467278,
thanks to Alex). Fix build with USE="opengl -X" (bug #483574, thanks to Sergey
Popov).
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key
CF0ADD61)
Revision Changes Path
1.1 x11-libs/cairo/files/cairo-1.12.16-all-clipped-3.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/cairo/files/cairo-1.12.16-all-clipped-3.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/cairo/files/cairo-1.12.16-all-clipped-3.patch?rev=1.1&content-type=text/plain
Index: cairo-1.12.16-all-clipped-3.patch
===================================================================
>From 180fead4390089e56c28dba0fcfaa99d127722c1 Mon Sep 17 00:00:00 2001
From: Chris Wilson <[email protected]>
Date: Thu May 1 23:39:01 PDT 2014
Subject: [PATCH] segfault in cairo-xcb-surface-render.c
http://lists.cairographics.org/archives/cairo/2014-May/025197.html
https://bugs.freedesktop.org/show_bug.cgi?id=77931
---
src/cairo-xcb-surface-render.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c
index 9625953..54307d5 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -3121,6 +3121,9 @@ _clip_and_composite_boxes (cairo_xcb_surface_t *dst,
clip = _cairo_clip_copy (extents->clip);
clip = _cairo_clip_intersect_boxes (clip, boxes);
+ if (_cairo_clip_is_all_clipped (clip))
+ return CAIRO_INT_STATUS_NOTHING_TO_DO;
+
status = _cairo_clip_get_polygon (clip, &polygon,
&fill_rule, &antialias);
_cairo_clip_path_destroy (clip->path);
--
1.9.2
1.1 x11-libs/cairo/files/cairo-1.12.16-all-clipped-2.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/cairo/files/cairo-1.12.16-all-clipped-2.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/cairo/files/cairo-1.12.16-all-clipped-2.patch?rev=1.1&content-type=text/plain
Index: cairo-1.12.16-all-clipped-2.patch
===================================================================
>From ed175b2a2bebb6def85133257bc11a875d13b0dd Mon Sep 17 00:00:00 2001
From: Uli Schlachter <[email protected]>
Date: Thu, 06 Mar 2014 08:45:08 +0000
Subject: clip: Fix handling of special all-clipped cairo_clip_t
_cairo_clip_intersect_box() wasn't checking if it was called with the special,
read-only all-clipped clip and thus could have ended up writing to read-only
memory.
References: https://bugs.freedesktop.org/show_bug.cgi?id=75819
Signed-off-by: Uli Schlachter <[email protected]>
---
diff --git a/src/cairo-clip-boxes.c b/src/cairo-clip-boxes.c
index 352654f..7bcbeb1 100644
--- a/src/cairo-clip-boxes.c
+++ b/src/cairo-clip-boxes.c
@@ -258,6 +258,9 @@ _cairo_clip_intersect_box (cairo_clip_t *clip,
{
cairo_rectangle_int_t r;
+ if (_cairo_clip_is_all_clipped (clip))
+ return clip;
+
_cairo_box_round_to_rectangle (box, &r);
if (r.width == 0 || r.height == 0)
return _cairo_clip_set_all_clipped (clip);
--
cgit v0.9.0.2-2-gbebe
1.1 x11-libs/cairo/files/cairo-1.12.16-all-clipped-1.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/cairo/files/cairo-1.12.16-all-clipped-1.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/cairo/files/cairo-1.12.16-all-clipped-1.patch?rev=1.1&content-type=text/plain
Index: cairo-1.12.16-all-clipped-1.patch
===================================================================
>From 3b261bea7d8e8094ff3899aefab6bbc8628a3585 Mon Sep 17 00:00:00 2001
From: Chris Wilson <[email protected]>
Date: Thu, 06 Mar 2014 08:34:10 +0000
Subject: clip: Do not modify the special all-clipped cairo_clip_t
Signed-off-by: Chris Wilson <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75819
---
diff --git a/src/cairo-clip-boxes.c b/src/cairo-clip-boxes.c
index bbb4197..352654f 100644
--- a/src/cairo-clip-boxes.c
+++ b/src/cairo-clip-boxes.c
@@ -173,7 +173,7 @@ _cairo_clip_intersect_rectangle_box (cairo_clip_t *clip,
clip->extents = *r;
} else {
if (! _cairo_rectangle_intersect (&clip->extents, r))
- clip = _cairo_clip_set_all_clipped (clip);
+ return _cairo_clip_set_all_clipped (clip);
}
if (clip->path == NULL)
clip->is_region = _cairo_box_is_pixel_aligned (box);
@@ -312,10 +312,12 @@ _cairo_clip_intersect_boxes (cairo_clip_t *clip,
_cairo_boxes_extents (boxes, &limits);
_cairo_box_round_to_rectangle (&limits, &extents);
- if (clip->path == NULL)
+ if (clip->path == NULL) {
clip->extents = extents;
- else if (! _cairo_rectangle_intersect (&clip->extents, &extents))
+ } else if (! _cairo_rectangle_intersect (&clip->extents, &extents)) {
clip = _cairo_clip_set_all_clipped (clip);
+ goto out;
+ }
if (clip->region) {
cairo_region_destroy (clip->region);
--
cgit v0.9.0.2-2-gbebe
1.1 x11-libs/cairo/files/cairo-1.12.16-lto-optional.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/cairo/files/cairo-1.12.16-lto-optional.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/cairo/files/cairo-1.12.16-lto-optional.patch?rev=1.1&content-type=text/plain
Index: cairo-1.12.16-lto-optional.patch
===================================================================
diff --git a/build/configure.ac.warnings b/build/configure.ac.warnings
index f984eb2..15b3da2 100644
--- a/build/configure.ac.warnings
+++ b/build/configure.ac.warnings
@@ -38,13 +38,18 @@ dnl options. Namely, the following:
dnl -flto working really needs a test link, not just a compile
-safe_MAYBE_WARN="$MAYBE_WARN"
-MAYBE_WARN="$MAYBE_WARN -flto"
-AC_TRY_LINK([],[
+AC_ARG_ENABLE(lto,
+ AS_HELP_STRING([--disable-lto],
+ [Do not try to use Link-Time Optimization]))
+if test "x$enable_lto" != "xno"; then
+ safe_MAYBE_WARN="$MAYBE_WARN"
+ MAYBE_WARN="$MAYBE_WARN -flto"
+ AC_TRY_LINK([],[
int main(int argc, char **argv) { return 0; }
-],[],[
+ ],[],[
MAYBE_WARN="$safe_MAYBE_WARN"
-])
+ ])
+fi
MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common"