[gtk-osx] Fix bug 724590, which crashes g-or-scanner.



commit f947de5eb733461cd01f00b786520db054a2f29a
Author: John Ralls <jralls ceridwen us>
Date:   Tue Feb 18 13:43:26 2014 -0800

    Fix bug 724590, which crashes g-or-scanner.

 modulesets-stable/gtk-osx.modules                  |    1 +
 ...1-Bug-724590-GSlice-slab_stack-corruption.patch |   28 ++++++++++++++++++++
 2 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/modulesets-stable/gtk-osx.modules b/modulesets-stable/gtk-osx.modules
index ae35791..22a42fe 100644
--- a/modulesets-stable/gtk-osx.modules
+++ b/modulesets-stable/gtk-osx.modules
@@ -69,6 +69,7 @@
   <autotools id="glib" autogen-sh="autoreconf">
     <branch module="glib/2.38/glib-2.38.2.tar.xz"  version="2.38.2"
             hash="sha256:056a9854c0966a0945e16146b3345b7a82562a5ba4d5516fd10398732aea5734">
+      <patch 
file="http://git.gnome.org/browse/gtk-osx/plain/patches/001-Bug-724590-GSlice-slab_stack-corruption.patch"; 
strip="1"/>
     </branch>
     <dependencies>
       <dep package="libffi"/>
diff --git a/patches/0001-Bug-724590-GSlice-slab_stack-corruption.patch 
b/patches/0001-Bug-724590-GSlice-slab_stack-corruption.patch
new file mode 100644
index 0000000..0e62201
--- /dev/null
+++ b/patches/0001-Bug-724590-GSlice-slab_stack-corruption.patch
@@ -0,0 +1,28 @@
+From 1b21a85f1914eecc107319cb94e8c8517291599b Mon Sep 17 00:00:00 2001
+From: John Ralls <jralls ceridwen us>
+Date: Mon, 17 Feb 2014 15:51:38 -0800
+Subject: [PATCH] Bug 724590 - GSlice slab_stack corruption
+
+Dereference allocation->contention_counters before trying to take the
+address of an element.
+---
+ glib/gslice.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/glib/gslice.c b/glib/gslice.c
+index 0563d80..2c5f4fb 100644
+--- a/glib/gslice.c
++++ b/glib/gslice.c
+@@ -715,7 +715,8 @@ static ChunkLink*
+ magazine_cache_pop_magazine (guint  ix,
+                              gsize *countp)
+ {
+-  g_mutex_lock_a (&allocator->magazine_mutex, &allocator->contention_counters[ix]);
++  guint *counters = allocator->contention_counters;
++  g_mutex_lock_a (&allocator->magazine_mutex, &counters[ix]);
+   if (!allocator->magazines[ix])
+     {
+       guint magazine_threshold = allocator_get_magazine_threshold (allocator, ix);
+-- 
+1.8.3.rc0
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]