1 |
tetromino 14/05/02 21:51:12 |
2 |
|
3 |
Added: cairo-1.12.16-all-clipped-3.patch |
4 |
cairo-1.12.16-all-clipped-2.patch |
5 |
cairo-1.12.16-all-clipped-1.patch |
6 |
cairo-1.12.16-lto-optional.patch |
7 |
Log: |
8 |
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). |
9 |
|
10 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key CF0ADD61) |
11 |
|
12 |
Revision Changes Path |
13 |
1.1 x11-libs/cairo/files/cairo-1.12.16-all-clipped-3.patch |
14 |
|
15 |
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 |
16 |
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 |
17 |
|
18 |
Index: cairo-1.12.16-all-clipped-3.patch |
19 |
=================================================================== |
20 |
From 180fead4390089e56c28dba0fcfaa99d127722c1 Mon Sep 17 00:00:00 2001 |
21 |
From: Chris Wilson <chris@×××××××××××××××.uk> |
22 |
Date: Thu May 1 23:39:01 PDT 2014 |
23 |
Subject: [PATCH] segfault in cairo-xcb-surface-render.c |
24 |
|
25 |
http://lists.cairographics.org/archives/cairo/2014-May/025197.html |
26 |
https://bugs.freedesktop.org/show_bug.cgi?id=77931 |
27 |
--- |
28 |
src/cairo-xcb-surface-render.c | 3 +++ |
29 |
1 file changed, 3 insertions(+) |
30 |
|
31 |
diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c |
32 |
index 9625953..54307d5 100644 |
33 |
--- a/src/cairo-xcb-surface-render.c |
34 |
+++ b/src/cairo-xcb-surface-render.c |
35 |
@@ -3121,6 +3121,9 @@ _clip_and_composite_boxes (cairo_xcb_surface_t *dst, |
36 |
|
37 |
clip = _cairo_clip_copy (extents->clip); |
38 |
clip = _cairo_clip_intersect_boxes (clip, boxes); |
39 |
+ if (_cairo_clip_is_all_clipped (clip)) |
40 |
+ return CAIRO_INT_STATUS_NOTHING_TO_DO; |
41 |
+ |
42 |
status = _cairo_clip_get_polygon (clip, &polygon, |
43 |
&fill_rule, &antialias); |
44 |
_cairo_clip_path_destroy (clip->path); |
45 |
-- |
46 |
1.9.2 |
47 |
|
48 |
|
49 |
|
50 |
|
51 |
1.1 x11-libs/cairo/files/cairo-1.12.16-all-clipped-2.patch |
52 |
|
53 |
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 |
54 |
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 |
55 |
|
56 |
Index: cairo-1.12.16-all-clipped-2.patch |
57 |
=================================================================== |
58 |
From ed175b2a2bebb6def85133257bc11a875d13b0dd Mon Sep 17 00:00:00 2001 |
59 |
From: Uli Schlachter <psychon@×××.in> |
60 |
Date: Thu, 06 Mar 2014 08:45:08 +0000 |
61 |
Subject: clip: Fix handling of special all-clipped cairo_clip_t |
62 |
|
63 |
_cairo_clip_intersect_box() wasn't checking if it was called with the special, |
64 |
read-only all-clipped clip and thus could have ended up writing to read-only |
65 |
memory. |
66 |
|
67 |
References: https://bugs.freedesktop.org/show_bug.cgi?id=75819 |
68 |
Signed-off-by: Uli Schlachter <psychon@×××.in> |
69 |
--- |
70 |
diff --git a/src/cairo-clip-boxes.c b/src/cairo-clip-boxes.c |
71 |
index 352654f..7bcbeb1 100644 |
72 |
--- a/src/cairo-clip-boxes.c |
73 |
+++ b/src/cairo-clip-boxes.c |
74 |
@@ -258,6 +258,9 @@ _cairo_clip_intersect_box (cairo_clip_t *clip, |
75 |
{ |
76 |
cairo_rectangle_int_t r; |
77 |
|
78 |
+ if (_cairo_clip_is_all_clipped (clip)) |
79 |
+ return clip; |
80 |
+ |
81 |
_cairo_box_round_to_rectangle (box, &r); |
82 |
if (r.width == 0 || r.height == 0) |
83 |
return _cairo_clip_set_all_clipped (clip); |
84 |
-- |
85 |
cgit v0.9.0.2-2-gbebe |
86 |
|
87 |
|
88 |
|
89 |
1.1 x11-libs/cairo/files/cairo-1.12.16-all-clipped-1.patch |
90 |
|
91 |
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 |
92 |
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 |
93 |
|
94 |
Index: cairo-1.12.16-all-clipped-1.patch |
95 |
=================================================================== |
96 |
From 3b261bea7d8e8094ff3899aefab6bbc8628a3585 Mon Sep 17 00:00:00 2001 |
97 |
From: Chris Wilson <chris@×××××××××××××××.uk> |
98 |
Date: Thu, 06 Mar 2014 08:34:10 +0000 |
99 |
Subject: clip: Do not modify the special all-clipped cairo_clip_t |
100 |
|
101 |
Signed-off-by: Chris Wilson <chris@×××××××××××××××.uk> |
102 |
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75819 |
103 |
--- |
104 |
diff --git a/src/cairo-clip-boxes.c b/src/cairo-clip-boxes.c |
105 |
index bbb4197..352654f 100644 |
106 |
--- a/src/cairo-clip-boxes.c |
107 |
+++ b/src/cairo-clip-boxes.c |
108 |
@@ -173,7 +173,7 @@ _cairo_clip_intersect_rectangle_box (cairo_clip_t *clip, |
109 |
clip->extents = *r; |
110 |
} else { |
111 |
if (! _cairo_rectangle_intersect (&clip->extents, r)) |
112 |
- clip = _cairo_clip_set_all_clipped (clip); |
113 |
+ return _cairo_clip_set_all_clipped (clip); |
114 |
} |
115 |
if (clip->path == NULL) |
116 |
clip->is_region = _cairo_box_is_pixel_aligned (box); |
117 |
@@ -312,10 +312,12 @@ _cairo_clip_intersect_boxes (cairo_clip_t *clip, |
118 |
_cairo_boxes_extents (boxes, &limits); |
119 |
|
120 |
_cairo_box_round_to_rectangle (&limits, &extents); |
121 |
- if (clip->path == NULL) |
122 |
+ if (clip->path == NULL) { |
123 |
clip->extents = extents; |
124 |
- else if (! _cairo_rectangle_intersect (&clip->extents, &extents)) |
125 |
+ } else if (! _cairo_rectangle_intersect (&clip->extents, &extents)) { |
126 |
clip = _cairo_clip_set_all_clipped (clip); |
127 |
+ goto out; |
128 |
+ } |
129 |
|
130 |
if (clip->region) { |
131 |
cairo_region_destroy (clip->region); |
132 |
-- |
133 |
cgit v0.9.0.2-2-gbebe |
134 |
|
135 |
|
136 |
|
137 |
1.1 x11-libs/cairo/files/cairo-1.12.16-lto-optional.patch |
138 |
|
139 |
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 |
140 |
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 |
141 |
|
142 |
Index: cairo-1.12.16-lto-optional.patch |
143 |
=================================================================== |
144 |
diff --git a/build/configure.ac.warnings b/build/configure.ac.warnings |
145 |
index f984eb2..15b3da2 100644 |
146 |
--- a/build/configure.ac.warnings |
147 |
+++ b/build/configure.ac.warnings |
148 |
@@ -38,13 +38,18 @@ dnl options. Namely, the following: |
149 |
|
150 |
dnl -flto working really needs a test link, not just a compile |
151 |
|
152 |
-safe_MAYBE_WARN="$MAYBE_WARN" |
153 |
-MAYBE_WARN="$MAYBE_WARN -flto" |
154 |
-AC_TRY_LINK([],[ |
155 |
+AC_ARG_ENABLE(lto, |
156 |
+ AS_HELP_STRING([--disable-lto], |
157 |
+ [Do not try to use Link-Time Optimization])) |
158 |
+if test "x$enable_lto" != "xno"; then |
159 |
+ safe_MAYBE_WARN="$MAYBE_WARN" |
160 |
+ MAYBE_WARN="$MAYBE_WARN -flto" |
161 |
+ AC_TRY_LINK([],[ |
162 |
int main(int argc, char **argv) { return 0; } |
163 |
-],[],[ |
164 |
+ ],[],[ |
165 |
MAYBE_WARN="$safe_MAYBE_WARN" |
166 |
-]) |
167 |
+ ]) |
168 |
+fi |
169 |
|
170 |
MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common" |