[PATCH] avoid GC segfault/hang/etc: make gnulib's hash module use GC

Jim Meyering jim at meyering.net
Fri Jul 29 17:39:16 UTC 2011


Here's a tentative patch for problems that arise only on rawhide (now F16).
I'll test more and give more detail in the log before pushing this.

>From 6fc3bec9e8767542d931b0fab9ac2df34e612218 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Fri, 29 Jul 2011 19:08:48 +0200
Subject: [PATCH] avoid GC segfault/hang/etc: make gnulib's hash module use GC

* bootstrap.conf (avoided_gnulib_modules): Add --avoid=hash-tests.
* gl/lib/hash.c.diff: New file.
---
 bootstrap.conf     |    2 ++
 gl/lib/hash.c.diff |   13 +++++++++++++
 2 files changed, 15 insertions(+), 0 deletions(-)
 create mode 100644 gl/lib/hash.c.diff

diff --git a/bootstrap.conf b/bootstrap.conf
index 46bfa52..ddebcbb 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -16,10 +16,12 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

 # The lock test takes too long for my taste.
+# The hash test would need linking help to get -lgc.
 avoided_gnulib_modules='
   --avoid=lock-tests
   --avoid=dummy
   --avoid=fflush-tests
+  --avoid=hash-tests
 '

 # gnulib modules used by this package.
diff --git a/gl/lib/hash.c.diff b/gl/lib/hash.c.diff
new file mode 100644
index 0000000..517d4e0
--- /dev/null
+++ b/gl/lib/hash.c.diff
@@ -0,0 +1,13 @@
+diff --git a/lib/hash.c b/lib/hash.c
+index f3de2aa..27f080e 100644
+--- a/lib/hash.c
++++ b/lib/hash.c
+@@ -43,6 +43,8 @@
+ # endif
+ #endif
+
++#include "../gc-wrap.h"
++
+ struct hash_entry
+   {
+     void *data;
--
1.7.6


More information about the iwhd-devel mailing list