summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-27 06:59:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-27 06:59:19 +0000
commit079505c040dd5cbf734816ec3b656b5921c977fc (patch)
tree53d8d6c26215ce6bcdf401d3a9e317388ad1d929 /signal.c
parent7348aa6113cdc2c9ce62044ab83f2ac1db82816d (diff)
* signal.c (ALT_STACK_SIZE): default minimum size is insufficient
for method calls. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/signal.c b/signal.c
index df41ddbdfd..e16308eebb 100644
--- a/signal.c
+++ b/signal.c
@@ -417,7 +417,7 @@ typedef RETSIGTYPE (*sighandler_t)(int);
#ifdef USE_SIGALTSTACK
#define SIGINFO_ARG , siginfo_t *info, void *ctx
#ifdef SIGSTKSZ
-#define ALT_STACK_SIZE SIGSTKSZ
+#define ALT_STACK_SIZE (SIGSTKSZ*2)
#else
#define ALT_STACK_SIZE (4*1024)
#endif
@@ -431,7 +431,7 @@ register_sigaltstack()
if (is_altstack_defined)
return;
- newSS.ss_sp = malloc(ALT_STACK_SIZE * 2);
+ newSS.ss_sp = malloc(ALT_STACK_SIZE);
if (newSS.ss_sp == NULL)
/* should handle error */
rb_bug("register_sigaltstack. malloc error\n");