Hello community,

here is the log from the commit of package cairo.1847 for openSUSE:12.3:Update 
checked in at 2013-07-15 13:53:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3:Update/cairo.1847 (Old)
 and      /work/SRC/openSUSE:12.3:Update/.cairo.1847.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cairo.1847"

Changes:
--------
New Changes file:

--- /dev/null   2013-07-15 01:04:09.588030756 +0200
+++ /work/SRC/openSUSE:12.3:Update/.cairo.1847.new/cairo.changes        
2013-07-15 13:53:12.000000000 +0200
@@ -0,0 +1,851 @@
+-------------------------------------------------------------------
+Sat Jul  6 00:49:18 CEST 2013 - sbra...@suse.cz
+
+- Fix yet another eog crash on assertion, after pressing Next
+  (cairo-reduce-buddy-assertion.patch, bnc828074#c3).
+
+-------------------------------------------------------------------
+Thu Jul  4 18:39:35 CEST 2013 - sbra...@suse.cz
+
+- Fix eog assert crash on some images due to unaligned memory
+  (cairo-reduce-assertion.patch, bnc828074).
+
+-------------------------------------------------------------------
+Wed Jun 12 10:14:20 UTC 2013 - idon...@suse.com
+
+- Add cairo-xlib-memleak.patch to fix a memory leak (bnc#824538) 
+
+-------------------------------------------------------------------
+Tue Nov  6 12:21:53 UTC 2012 - dims...@opensuse.org
+
+- Update to version 1.12.8:
+  + Expand the sanity checking for broken combinations of
+    XSendEvent and ShmCompletionEvent.
+  + Notice that "The X.Org Foundation" sometimes also identifies
+    itself as "The Xorg Foundation".
+  + Handle various ages of libXext and its Shm headers.
+  + Fix the invalid clipping of the source drawable when using SHM
+    transport to upload images (fdo#56547).
+  + Handle all Type1 postscript operators for better font
+    compatibility (fdo#56265).
+  + Fix a couple of memory leaks in Type1 font subsetting
+    (fdo#56566)
+  + Tighten the evaluation of the start/stop pen vertices, and catch
+    a few instances where we would use a fan instead of a bevel.
+    (fdo#56432)
+  + Fix assumption that geometric clipping always succeeds with the
+    span-compositor (fdo#56574)
+  + Fix call to spline intersection when evaluating whether a stoke
+    is visible.
+  + Remember to copy inferior sources when using SHM to readback the
+    surface for use as a source.
+- Changes from version 1.12.6:
+  + Fix the recording surface to actually snapshot the source and
+    so fix PDF drawing.
+  + Calling XSendEvent with an XShmCompletionEvent is incompatabile
+    with older Xorg servers.
+  + Reorder CloseDisplay chain so that XShm is not reinstantiated
+    after shutdown, causing a potential crash if the Display was
+    immediately recreated using the same memory address.
+  + Make sure that the Xserver has attached to the SHM segment
+    before deleting it from the global namespace on systems that do
+    not support deferred deletion.
+  + Type1 subsetting support for PDF (and PS) was once again
+    improved to work with a larger number of PDF readers.
+  + GLESv2 build fixes and improved support for embedded GPUs.
+  + Tweak the invisible pen detection for applications that are
+    currently using too large values for geometric tolerance.
+  + A build fix for older freetype libraries.
+- Rebase cairo-modules-no-version.patch.
+
+-------------------------------------------------------------------
+Fri Oct 12 12:00:24 UTC 2012 - dims...@opensuse.org
+
+- Update to version 1.12.4:
+  + Interior boxes were being dropped when amalgamating regions
+    during tesselation (fdo#49446)
+  + Allow building without gtk-doc installed
+  + Invalid edge generation whilst reducing complex polygons
+    (fdo#50852)
+  + Stroking around tight cusps
+  + Use locale correct formats for reading font subsetting and
+    valid buffers (fdo#51443)
+  + Ensure that the type1 subset includes all the glyph encodings
+    (fdo#53040)
+  + Upload the whole source for a repeating pattern (fdo#51910)
+  + Fix damage tracking to handle continuation chunks corectly and
+    so prevent crashes on win32 (fdo#53384)
+  + Avoid emitting miter joins for degenerate line segments
+    (fdo#407107)
+  + Convert the relative path semgents into the backend coordinates
+    and then back again to user coordinates (fdo#54732)
+  + Fix extents computations for a degenerate path consisting only
+    of a move-to (fdo#54549)
+  + Prevent crashing on a degenerate project edge after polygon
+    intersection (fdo#54822).
+- Add pkgconfig(xext) BuildRequires: new verified dependency.
+
+-------------------------------------------------------------------
+Sun Apr 29 21:09:19 UTC 2012 - dims...@opensuse.org
+
+- Update to version 1.12.2:
+  + Allow applications to create 0x0 xlib surfaces, such as used by
+    LibreOffice (fdo#49118)
+  + Trim composite extents for SOURCE/CLEAR operators to the mask.
+  + Use fallback fonts in PDF for unhandled computed glyph widths
+    (fdo#48349)
+  + Handle snapshots of recording surfaces for analysing pattern
+    extents. Fixes a regression of reporting the PDF bounding box
+    as being the page size.
+  + Fix allocation size for PDF pattern ids. (fdo#49089)
+  + Fix emission of rectilinear dashed segments, with and without
+    scaling, and application of degenerate line joins.
+  + Clamp unbounded fixup polygons to the clip extents.
+  + Prevent infinite loop due to rounding errors whilst
+    incrementing along dashes.
+  + Prevent overflow for inline a8 span filling.
+  + Miscellaneous build fixes for Cygwin on Windows and Solaris.
+- Drop cairo-fix-wrong-allocation.patch: fixed upstream.
+
+-------------------------------------------------------------------
+Sat Apr 21 15:34:36 UTC 2012 - je...@suse.com
+
+- Add cairo-fix-wrong-allocation: fix wrong allocation in
+  _cairo_pdf_surface_add_source_surface (bnc#758422).
+
+-------------------------------------------------------------------
+Mon Mar 26 18:57:45 UTC 2012 - zai...@opensuse.org
+
+- Update to version 1.12.0:
+  + Introduction of a new procedural pattern: the mesh gradient.
+  + New API to create a callback pattern:
+    cairo_pattern_create_raster_source.
+  + XCB is now a supported backend.
+  + New common API to address any surface as an image and so allow
+    direct modification of the raster data:
+    cairo_surface_create_similar_image, cairo_surface_map_to_image,
+    and cairo_surface_unmap_image.
+  + Many performance improvements.
+  + Introduction of new antialias hints (NONE, FAST, GOOD, BEST).
+  + Introduction of a new observation architecture:
+    cairo_surface_observer_t.
+  + OpenGL backend has seen significant work including the port to
+    GLESv2 and the exploitation of advanced hardware features.
+- Enable build of XCB backend as it's now officially supported: set
+  %build_xcb_backend macro to 1.
+- Note that we don't build Xlib/XCB support as it's disabled by
+  default upstream.
+- Also add pkgconfig(xcb-shm) BuildRequires for XCB/SHM support.
+- Drop cairo-fix-libs.patch: fixed upstream.
+
+-------------------------------------------------------------------
+Tue Feb 14 09:59:51 UTC 2012 - vu...@opensuse.org
+
+- Ship additional COPYING files that come with some utilities.
+- Fix license of the tool subpackage: it is GPL-3.0+ (bnc#739748).
+- Change the group of library subpackages from
+  Development/Libraries/X11 to System/Libraries.
+
+-------------------------------------------------------------------
+Fri Dec  9 11:48:43 UTC 2011 - co...@suse.com
+
+- fix license to be in spdx.org format
+
+-------------------------------------------------------------------
+Fri Sep 30 20:07:46 UTC 2011 - co...@suse.com
+
+- add libtool as buildrequire to make the spec file more reliable
+
+-------------------------------------------------------------------
+Sat Sep 17 22:31:04 UTC 2011 - jeng...@medozas.de
+
+- Remove redundant tags/sections from specfile
+- Use %_smp_mflags for parallel build
+- Fix baselibs requires for cairo-devel and make it available
+
+-------------------------------------------------------------------
+Mon Aug 29 12:06:00 UTC 2011 - co...@novell.com
+
+- Add cairo-fix-libs.patch: disable lto for cairo-sphinx as it
+  breaks with -Wl,--as-needed.
+
+-------------------------------------------------------------------
+Tue Feb 22 15:19:31 CET 2011 - vu...@opensuse.org
+
+- Add missing libcairo-gobject2 to baselibs.conf.
+
+-------------------------------------------------------------------
+Mon Dec 27 22:30:26 CET 2010 - dims...@opensuse.org
+
+- Update to version 1.10.2:
+  + fdo#31632: Fix embedding of grayscale jpegs in PS.
+  + Fix the reported path of extents containing a curve.
+  + Fix the compositing of unaligned boxes.
+  + Reset the clipper in PDF upon finish.
+  + Fix degenerates arcs to become a degenerate line.
+  + Build support for autoconf 2.67
+  + Fix painting of transformed patterns in PS
+  + fdo#24688: Fix the EPS bounding box for PS and Fix the missing
+    content for EPS
+  + fdo#24691: Fix regression upon changing page size in PS/PDF
+  + Only use ActualText with PDF-1.5 documents
+  + Fix the bbox for type1 fallbacks.
+  + fdo#31140: Reset the color after ending the context in PDF
+  + fdo#31062: Fix the advance of subsetted type1 fonts
+  + Fix handling of EXTEND_NONE gradients for PDF
+  + Restrict in-place optimisation for a8 image masks with SOURCE
+
++++ 654 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:12.3:Update/.cairo.1847.new/cairo.changes

New:
----
  baselibs.conf
  cairo-1.12.8.tar.xz
  cairo-modules-no-version.patch
  cairo-reduce-assertion.patch
  cairo-reduce-buddy-assertion.patch
  cairo-xlib-memleak.patch
  cairo.changes
  cairo.spec

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cairo.spec ++++++
#
# spec file for package cairo
#
# Copyright (c) 2013 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define build_xcb_backend 1
%define build_gl_backend 0

Name:           cairo
Version:        1.12.8
Release:        0
Summary:        Vector Graphics Library with Cross-Device Output Support
License:        LGPL-2.1+ or MPL-1.1
Group:          System/Libraries
Url:            http://cairographics.org/
Source:         http://cairographics.org/releases/%{name}-%{version}.tar.xz
Source99:       baselibs.conf
# PATCH-FIX-UPSTREAM cairo-modules-no-version.patch fdo#29319 
dims...@opensuse.org -- Build modules with -module -avoid-version.
Patch0:         cairo-modules-no-version.patch
# PATCH-FIX-UPSTREAM cairo-xlib-memleak.patch upstream commit 
5d21c9e224617110678a5b854a6a41049a02fca2
Patch1:         cairo-xlib-memleak.patch
# PATCH-FIX-UPSTREAM cairo-reduce-assertion.patch upstream commit 
a0fb1391315033de54368715a8855aedea258e67 bnc828074 -- Fix assert crash on 
unaligned memory.
Patch2:         cairo-reduce-assertion.patch
# PATCH-FIX-UPSTREAM cairo-reduce-buddy-assertion.patch upstream commit 
01a8bf01c6508a4fea8d40371c3049e7a2f7908a bnc828074#c3 -- Fix assert crash on 
unaligned memory.
Patch3:         cairo-reduce-buddy-assertion.patch
# These libraries are needed only for tests.
# Do not enable tests in build systems, it causes build loop!
#BuildRequires:  librsvg-devel poppler-devel
%if %build_gl_backend
BuildRequires:  Mesa-devel
%endif
BuildRequires:  gtk-doc
# Needed by patch0
BuildRequires:  libtool
BuildRequires:  pkg-config
BuildRequires:  pkgconfig(fontconfig)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(gobject-2.0)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(pixman-1)
BuildRequires:  pkgconfig(x11)
%if %build_xcb_backend
BuildRequires:  pkgconfig(xcb)
BuildRequires:  pkgconfig(xcb-shm)
%endif
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(xrender)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Cairo is a vector graphics library with cross-device output support.
Currently supported output targets include the X Window System,
in-memory image buffers, and PostScript. Cairo is designed to produce
identical output on all output media while taking advantage of display
hardware acceleration when available.

%package -n libcairo2
Summary:        Vector Graphics Library with Cross-Device Output Support
License:        LGPL-2.1+ or MPL-1.1
Group:          System/Libraries
Provides:       cairo = %{version}
Obsoletes:      cairo < %{version}
# bug437293
%ifarch ppc64
Obsoletes:      cairo-64bit
%endif
#

%description -n libcairo2
Cairo is a vector graphics library with cross-device output support.
Currently supported output targets include the X Window System,
in-memory image buffers, and PostScript. Cairo is designed to produce
identical output on all output media while taking advantage of display
hardware acceleration when available.

%package -n libcairo-gobject2
Summary:        Vector Graphics Library with Cross-Device Output Support
License:        LGPL-2.1+ or MPL-1.1
Group:          System/Libraries

%description -n libcairo-gobject2
Cairo is a vector graphics library with cross-device output support.
Currently supported output targets include the X Window System,
in-memory image buffers, and PostScript. Cairo is designed to produce
identical output on all output media while taking advantage of display
hardware acceleration when available.

This library contains GType declarations for Cairo types. It is also
meant to support gobject-introspection binding creation.

%package -n libcairo-script-interpreter2
Summary:        Vector Graphics Library with Cross-Device Output Support
License:        LGPL-2.1+ or MPL-1.1
Group:          System/Libraries

%description -n libcairo-script-interpreter2
Cairo is a vector graphics library with cross-device output support.
Currently supported output targets include the X Window System,
in-memory image buffers, and PostScript. Cairo is designed to produce
identical output on all output media while taking advantage of display
hardware acceleration when available.

%package tools
Summary:        Vector Graphics Library with Cross-Device Output Support -- 
Utilities
License:        GPL-3.0+
Group:          Development/Libraries/X11
# We need an explicit requires since nothing links to the cairo library
Requires:       libcairo2 = %{version}
# Named changed during  development of 11.4
Provides:       %{name}-utils = %{version}
Obsoletes:      %{name}-utils < %{version}

%description tools
Cairo is a vector graphics library with cross-device output support.
Currently supported output targets include the X Window System,
in-memory image buffers, and PostScript. Cairo is designed to produce
identical output on all output media while taking advantage of display
hardware acceleration when available.

This package contains various cairo utilities.

%package devel
Summary:        Development environment for cairo
License:        LGPL-2.1+ or MPL-1.1
Group:          Development/Libraries/X11
Requires:       libcairo-gobject2 = %{version}
Requires:       libcairo-script-interpreter2 = %{version}
Requires:       libcairo2 = %{version}
Provides:       cairo-doc = %{version}
Obsoletes:      cairo-doc < %{version}
# bug437293
%ifarch ppc64
Obsoletes:      cairo-devel-64bit
%endif
#

%description devel
This package contains all files necessary to build binaries using
cairo.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1

%build
# Needed by patch0
NOCONFIGURE=1 ./autogen.sh
%configure \
    --with-pic \
    --enable-fc \
    --enable-ft \
%if %build_gl_backend
    --enable-gl \
%endif
    --enable-ps \
    --enable-pdf \
    --enable-script \
    --enable-svg \
    --enable-tee \
%if %build_xcb_backend
    --enable-xcb \
%endif
    --enable-xlib \
    --disable-gtk-doc \
    --disable-static
make %{?_smp_mflags} V=1

%install
%makeinstall
%if 0%{?suse_version} > 1110
find %{buildroot} -type f -name "*.la" -delete -print
%endif

%post -n libcairo2 -p /sbin/ldconfig

%postun -n libcairo2 -p /sbin/ldconfig

%post -n libcairo-gobject2 -p /sbin/ldconfig

%postun -n libcairo-gobject2 -p /sbin/ldconfig

%post -n libcairo-script-interpreter2 -p /sbin/ldconfig

%postun -n libcairo-script-interpreter2 -p /sbin/ldconfig

%files -n libcairo2
%defattr(-, root, root)
%doc AUTHORS COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1 ChangeLog NEWS README
%{_libdir}/libcairo.so.*

%files -n libcairo-gobject2
%defattr(-, root, root)
%{_libdir}/libcairo-gobject.so.2*

%files -n libcairo-script-interpreter2
%defattr(-, root, root)
%doc util/cairo-script/COPYING
%{_libdir}/libcairo-script-interpreter.so.*

%files tools
%defattr(-, root, root)
%doc util/cairo-trace/COPYING util/cairo-trace/COPYING-GPL-3
%{_bindir}/cairo-sphinx
%{_bindir}/cairo-trace
%dir %{_libdir}/cairo
%{_libdir}/cairo/cairo-fdr.so
%{_libdir}/cairo/cairo-sphinx.so
%{_libdir}/cairo/libcairo-trace.so

%files devel
%defattr(-, root, root)
%doc PORTING_GUIDE
%doc %{_datadir}/gtk-doc/html/cairo
%{_includedir}/cairo/
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%if 0%{?suse_version} <= 1110
%{_libdir}/*.la
%endif

%changelog
++++++ baselibs.conf ++++++
libcairo2
  provides "cairo-<targettype> = <version>"
  obsoletes "cairo-<targettype> < <version>"
libcairo-gobject2
libcairo-script-interpreter2
cairo-devel
  requires -cairo-<targettype>
  requires "libcairo2-<targettype> = <version>"
  requires "libcairo-gobject2-<targettype> = <version>"
  requires "libcairo-script-interpreter2-<targettype> = <version>"
++++++ cairo-modules-no-version.patch ++++++
Index: cairo-1.12.8/util/cairo-fdr/Makefile.am
===================================================================
--- cairo-1.12.8.orig/util/cairo-fdr/Makefile.am
+++ cairo-1.12.8/util/cairo-fdr/Makefile.am
@@ -9,7 +9,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/src \
 cairo_fdr_la_SOURCES = fdr.c
 cairo_fdr_la_CPPFLAGS = $(AM_CPPFLAGS)
 cairo_fdr_la_CFLAGS = $(CAIRO_CFLAGS)
-cairo_fdr_la_LDFLAGS = -module -no-undefined
+cairo_fdr_la_LDFLAGS = -module -no-undefined -avoid-version
 if CAIRO_HAS_DL
 cairo_fdr_la_LIBADD = -ldl
 endif
Index: cairo-1.12.8/util/cairo-trace/Makefile.am
===================================================================
--- cairo-1.12.8.orig/util/cairo-trace/Makefile.am
+++ cairo-1.12.8/util/cairo-trace/Makefile.am
@@ -11,7 +11,7 @@ libcairo_trace_la_SOURCES = trace.c
 libcairo_trace_la_CPPFLAGS = -DCAIRO_TRACE_OUTDIR="\"$(cairooutdir)\"" \
                          $(AM_CPPFLAGS)
 libcairo_trace_la_CFLAGS = $(CAIRO_CFLAGS) $(real_pthread_CFLAGS)
-libcairo_trace_la_LDFLAGS = -no-undefined
+libcairo_trace_la_LDFLAGS = -no-undefined -module -avoid-version
 
 libcairo_trace_la_LIBADD = $(real_pthread_LIBS) -lz
 if CAIRO_HAS_DL
Index: cairo-1.12.8/util/cairo-sphinx/Makefile.am
===================================================================
--- cairo-1.12.8.orig/util/cairo-sphinx/Makefile.am
+++ cairo-1.12.8/util/cairo-sphinx/Makefile.am
@@ -11,7 +11,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/src \
 cairo_sphinx_la_SOURCES = fdr.c
 cairo_sphinx_la_CPPFLAGS = $(AM_CPPFLAGS)
 cairo_sphinx_la_CFLAGS = $(CAIRO_CFLAGS)
-cairo_sphinx_la_LDFLAGS = -module -no-undefined
+cairo_sphinx_la_LDFLAGS = -module -no-undefined -avoid-version
 if CAIRO_HAS_DL
 cairo_sphinx_la_LIBADD = -ldl
 endif
++++++ cairo-reduce-assertion.patch ++++++
>From a0fb1391315033de54368715a8855aedea258e67 Mon Sep 17 00:00:00 2001
From: Chris Wilson <ch...@chris-wilson.co.uk>
Date: Sat, 01 Dec 2012 09:21:15 +0000
Subject: mempool: Reduce the assertion into an alignment adjustment for the base

Instead of asserting that the caller passed in a chunk-aligned base
pointer, just perform the fixup whilst initialising the mempool. This
means that the caller (xcb!) cannot assume that the mempool->base is
then the same base pointer as passed in and so needs to store it
separately for use in computing SHM offsets.

Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
---
diff --git a/src/cairo-mempool.c b/src/cairo-mempool.c
index 296b739..96e4a62 100644
--- a/src/cairo-mempool.c
+++ b/src/cairo-mempool.c
@@ -283,9 +283,18 @@ _cairo_mempool_init (cairo_mempool_t *pool,
                      void *base, size_t bytes,
                      int min_bits, int num_sizes)
 {
+    unsigned long tmp;
     int num_blocks;
     int i;
 
+    /* Align the start to an integral chunk */
+    tmp = ((unsigned long) base) & ((1 << min_bits) - 1);
+    if (tmp) {
+       tmp = (1 << min_bits) - tmp;
+       base = (char *)base + tmp;
+       bytes -= tmp;
+    }
+
     assert ((((unsigned long) base) & ((1 << min_bits) - 1)) == 0);
     assert (num_sizes < ARRAY_LENGTH (pool->free));
 
diff --git a/src/cairo-xcb-shm.c b/src/cairo-xcb-shm.c
index 7c2a675..2be2dac 100644
--- a/src/cairo-xcb-shm.c
+++ b/src/cairo-xcb-shm.c
@@ -63,6 +63,7 @@ typedef enum {
 struct _cairo_xcb_shm_mem_pool {
     int shmid;
     uint32_t shmseg;
+    void *shm;
 
     cairo_mempool_t mem;
 
@@ -74,7 +75,7 @@ _cairo_xcb_shm_mem_pool_destroy (cairo_xcb_shm_mem_pool_t 
*pool)
 {
     cairo_list_del (&pool->link);
 
-    shmdt (pool->mem.base);
+    shmdt (pool->shm);
     _cairo_mempool_fini (&pool->mem);
 
     free (pool);
@@ -160,7 +161,6 @@ _cairo_xcb_connection_allocate_shm_info 
(cairo_xcb_connection_t *connection,
     size_t shm_allocated = 0;
     void *mem = NULL;
     cairo_status_t status;
-    void *base;
 
     assert (connection->flags & CAIRO_XCB_HAS_SHM);
 
@@ -240,18 +240,18 @@ _cairo_xcb_connection_allocate_shm_info 
(cairo_xcb_connection_t *connection,
        return CAIRO_INT_STATUS_UNSUPPORTED;
     }
 
-    base = shmat (pool->shmid, NULL, 0);
-    if (unlikely (base == (char *) -1)) {
+    pool->shm = shmat (pool->shmid, NULL, 0);
+    if (unlikely (pool->shm == (char *) -1)) {
        shmctl (pool->shmid, IPC_RMID, NULL);
        free (pool);
        CAIRO_MUTEX_UNLOCK (connection->shm_mutex);
        return _cairo_error (CAIRO_STATUS_NO_MEMORY);
     }
 
-    status = _cairo_mempool_init (&pool->mem, base, bytes,
+    status = _cairo_mempool_init (&pool->mem, pool->shm, bytes,
                                  minbits, maxbits - minbits + 1);
     if (unlikely (status)) {
-       shmdt (base);
+       shmdt (pool->shm);
        free (pool);
        CAIRO_MUTEX_UNLOCK (connection->shm_mutex);
        return status;
@@ -275,7 +275,7 @@ _cairo_xcb_connection_allocate_shm_info 
(cairo_xcb_connection_t *connection,
     shm_info->pool = pool;
     shm_info->shm = pool->shmseg;
     shm_info->size = size;
-    shm_info->offset = (char *) mem - (char *) pool->mem.base;
+    shm_info->offset = (char *) mem - (char *) pool->shm;
     shm_info->mem = mem;
     shm_info->sync.sequence = XCB_NONE;
 
--
cgit v0.9.0.2-2-gbebe
++++++ cairo-reduce-buddy-assertion.patch ++++++
>From 01a8bf01c6508a4fea8d40371c3049e7a2f7908a Mon Sep 17 00:00:00 2001
From: Chris Wilson <ch...@chris-wilson.co.uk>
Date: Fri, 15 Mar 2013 09:08:00 +0000
Subject: [PATCH] mempool: Reduce an assert into an error return for
 get_buddy()

If we ask for a buddy that is outside of our allocation that is an
error that should not happen with a power-of-two allocated zone...
However, since it has been seen in the wild, we can safely return that
there is no buddy rather than die in a too-late assert.

Reported-by: Anton Eliasson <de...@antoneliasson.se>
Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
---
 src/cairo-mempool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/cairo-mempool.c b/src/cairo-mempool.c
index 96e4a62..751ede3 100644
--- a/src/cairo-mempool.c
+++ b/src/cairo-mempool.c
@@ -157,7 +157,8 @@ get_buddy (cairo_mempool_t *pool, size_t offset, int bits)
 {
     struct _cairo_memblock *block;
 
-    assert (offset + (1 << bits) <= pool->num_blocks);
+    if (offset + (1 << bits) >= pool->num_blocks)
+       return NULL; /* invalid */
 
     if (BITTEST (pool, offset + (1 << bits) - 1))
        return NULL; /* buddy is allocated */
-- 
1.8.1.4

++++++ cairo-xlib-memleak.patch ++++++
Index: cairo-1.12.8/src/cairo-xlib-surface-shm.c
===================================================================
--- cairo-1.12.8.orig/src/cairo-xlib-surface-shm.c
+++ cairo-1.12.8/src/cairo-xlib-surface-shm.c
@@ -679,7 +679,7 @@ _cairo_xlib_shm_surface_finish (void *ab
     cairo_list_del (&shm->link);
 
     cairo_device_release (&display->base);
-    return CAIRO_STATUS_SUCCESS;
+    return _cairo_image_surface_finish (abstract_surface);
 }
 
 static const cairo_surface_backend_t cairo_xlib_shm_surface_backend = {
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to