summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-15 14:20:12 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-15 14:20:12 +0000
commitaff9dff46d79181d143697d7b9e76735788e45cc (patch)
tree004b41af951802cd8638800184cd4633cee21590 /vm.c
parentcbe5f8820b71e0e9a214ae86e9264712e5580413 (diff)
* signal.c (rb_sigaltstack_size): new. calculate stack size for
sigsegv handler. enlarge value when x86 or x86_64 on Linux. Linux has very small MINSIGSTKSZ size (2048 bytes) and our sigsegv routine need 5KiB at least. [Bug #7141] * internal.h: add declaration of rb_sigaltstack_size(). * vm_core.h: remove ALT_STACK_SIZE definition. * signal.c (rb_register_sigaltstack): replace ALT_STACK_SIZE with rb_sigaltstack_size(); * gc.c (Init_heap): ditto. * vm.c (th_init): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm.c b/vm.c
index da15fd2675..2266754fc7 100644
--- a/vm.c
+++ b/vm.c
@@ -1834,7 +1834,7 @@ th_init(rb_thread_t *th, VALUE self)
/* allocate thread stack */
#ifdef USE_SIGALTSTACK
/* altstack of main thread is reallocated in another place */
- th->altstack = malloc(ALT_STACK_SIZE);
+ th->altstack = malloc(rb_sigaltstack_size());
#endif
th->stack_size = RUBY_VM_THREAD_STACK_SIZE;
th->stack = thread_recycle_stack(th->stack_size);