bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] c-stack: work around libsigsegv 2.8 bug


From: Eric Blake
Subject: [PATCH] c-stack: work around libsigsegv 2.8 bug
Date: Thu, 21 Oct 2010 11:26:51 -0600

* lib/c-stack.c (SIGSTKSZ): Increase size to avoid alternate stack
overflow on at least PowerPC64.

Signed-off-by: Eric Blake <address@hidden>
---

If I knew of a public archives of the bug-libsigsegv list, I could
point to more details.  At any rate, this patch fixes 'make check'
for a build of m4 on powerpc64 with a broken libsigsegv 2.8 installed.

 ChangeLog     |    6 ++++++
 lib/c-stack.c |    6 ++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 30d89ea..a265b14 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-10-21  Eric Blake  <address@hidden>
+
+       c-stack: work around libsigsegv 2.8 bug
+       * lib/c-stack.c (SIGSTKSZ): Increase size to avoid alternate stack
+       overflow on at least PowerPC64.
+
 2010-10-17  Bruno Haible  <address@hidden>

        userspec: Drop redundant file.
diff --git a/lib/c-stack.c b/lib/c-stack.c
index 4657548..0cf6b05 100644
--- a/lib/c-stack.c
+++ b/lib/c-stack.c
@@ -53,6 +53,12 @@ typedef struct sigaltstack stack_t;
 #endif
 #ifndef SIGSTKSZ
 # define SIGSTKSZ 16384
+#elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
+/* libsigsegv 2.6 through 2.8 have a bug where some architectures use
+   more than the Linux default of an 8k alternate stack when deciding
+   if a fault was caused by stack overflow.  */
+# undef SIGSTKSZ
+# define SIGSTKSZ 16384
 #endif

 #include <stdlib.h>
-- 
1.7.2.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]