From: Eric Blake Date: Thu, 21 Oct 2010 16:29:13 +0000 (-0600) Subject: c-stack: work around libsigsegv 2.8 bug X-Git-Tag: v0.1~3669 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=b86f488e783121f54dbd44e17741fa3b29e9be9b;p=gnulib.git c-stack: work around libsigsegv 2.8 bug * lib/c-stack.c (SIGSTKSZ): Increase size to avoid alternate stack overflow on at least PowerPC64. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 30d89ea2a..a265b14bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-10-21 Eric Blake + + 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 userspec: Drop redundant file. diff --git a/lib/c-stack.c b/lib/c-stack.c index 46575489d..0cf6b052d 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