summaryrefslogtreecommitdiffstats
path: root/source/l/cairo
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2016-06-30 20:26:57 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 23:31:18 +0200
commitd31c50870d0bee042ce660e445c9294a59a3a65b (patch)
tree6bfc0de3c95267b401b620c2c67859557dc60f97 /source/l/cairo
parent76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (diff)
downloadcurrent-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.gz
current-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.xz
Slackware 14.2slackware-14.2
Thu Jun 30 20:26:57 UTC 2016 Slackware 14.2 x86_64 stable is released! The long development cycle (the Linux community has lately been living in "interesting times", as they say) is finally behind us, and we're proud to announce the release of Slackware 14.2. The new release brings many updates and modern tools, has switched from udev to eudev (no systemd), and adds well over a hundred new packages to the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-)
Diffstat (limited to 'source/l/cairo')
-rwxr-xr-xsource/l/cairo/cairo.SlackBuild21
-rw-r--r--source/l/cairo/cairo.c088ba1faab9579efdaed7a524124901a17801b0.diff60
2 files changed, 71 insertions, 10 deletions
diff --git a/source/l/cairo/cairo.SlackBuild b/source/l/cairo/cairo.SlackBuild
index 1b834332d..79170d358 100755
--- a/source/l/cairo/cairo.SlackBuild
+++ b/source/l/cairo/cairo.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2013, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,12 +23,12 @@
PKGNAM=cairo
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -37,8 +37,8 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -68,6 +68,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+zcat $CWD/cairo.c088ba1faab9579efdaed7a524124901a17801b0.diff.gz | patch -p1 --verbose || exit 1
+
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
@@ -81,26 +83,25 @@ CFLAGS="$SLKCFLAGS" \
--disable-trace \
--enable-xlib \
--enable-xcb \
- --enable-xcb-shm \
- --enable-xlib-xcb \
--enable-ps \
--enable-pdf \
--enable-svg \
--enable-tee \
+ --enable-ft \
+ --enable-gl \
--enable-gobject \
--enable-xml \
--build=$ARCH-slackware-linux
# None of these are 'stable' yet...
# --enable-qt \
-# --enable-gl \
# --enable-drm \
-# --enable-xlib-xcb \
-# --enable-xcb-shm \
# Not sure if these two are needed / useful yet; --enable-xcb is now default
# --enable-xcb-shm \
+# ^^ may cause GTK+3 instability
# --enable-xlib-xcb \
+# ^^ this one caused a GIMP slowdown
# Skipping this, because it causes a dependency on the specific
# version of binutils installed at compile time:
diff --git a/source/l/cairo/cairo.c088ba1faab9579efdaed7a524124901a17801b0.diff b/source/l/cairo/cairo.c088ba1faab9579efdaed7a524124901a17801b0.diff
new file mode 100644
index 000000000..c954cc7dd
--- /dev/null
+++ b/source/l/cairo/cairo.c088ba1faab9579efdaed7a524124901a17801b0.diff
@@ -0,0 +1,60 @@
+From c088ba1faab9579efdaed7a524124901a17801b0 Mon Sep 17 00:00:00 2001
+From: Uli Schlachter <psychon@znc.in>
+Date: Sat, 18 Jun 2016 15:08:52 +0200
+Subject: [PATCH] xlib: Fix double free in _get_image_surface()
+
+If XShmGetImage() fails, the code tries to continue with its normal,
+non-shared-memory path. However, the image variable, which was previously set to
+NULL, now points to an already-destroyed surface, causing a double-free when the
+function cleans up after itself (actually, its an assertion failure because the
+reference count of the surface is zero, but technically this is still a double
+free).
+
+Fix this by setting image=NULL after destroying the surface that this refers to,
+to make sure this surface will not be destroyed again.
+
+While we are here (multiple changes in a single commit are bad...), also fix the
+cleanup done in bail. In practice, &image->base should be safe when image==NULL,
+because this just adds some offset to the pointer (the offset here is actually
+zero, so this doesn't do anything at all). However, the C standard does not
+require this to be safe, so let's handle this case specially.
+
+Note that anything that is fixed by this change is still buggy, because the only
+reason why XShmGetImage() could fail would be BadDrawable, meaning that the
+target we draw to does not exist or was already destroyed. This patch will
+likely just cause X11 errors elsewhere and drawing to (possible) invalid
+drawables is not supported by cairo anyway. This means that if SHM fails, the
+following fallback code has a high chance of failing, too.
+
+Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91967
+Signed-off-by: Uli Schlachter <psychon@znc.in>
+---
+ src/cairo-xlib-surface.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
+index 3f407c3..555c1fe 100644
+--- a/src/cairo-xlib-surface.c
++++ b/src/cairo-xlib-surface.c
+@@ -807,6 +807,7 @@ _get_image_surface (cairo_xlib_surface_t *surface,
+ }
+
+ cairo_surface_destroy (&image->base);
++ image = NULL;
+ }
+ }
+
+@@ -1011,7 +1012,8 @@ _get_image_surface (cairo_xlib_surface_t *surface,
+ cairo_device_release (&display->base);
+
+ if (unlikely (status)) {
+- cairo_surface_destroy (&image->base);
++ if (image)
++ cairo_surface_destroy (&image->base);
+ return _cairo_surface_create_in_error (status);
+ }
+
+--
+2.8.1
+
+