summaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-30 09:24:41 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-30 09:24:41 +0000
commit409e8e46faaf6407737a03789d18070d05c1d71a (patch)
tree214e20f94e1539ca22cd8c1cb2da59e0fb14ac17 /thread.c
parentc0888f3aa069317a7d1e95a03d56aa72990f2063 (diff)
downloadruby-409e8e46faaf6407737a03789d18070d05c1d71a.tar.gz
ruby-409e8e46faaf6407737a03789d18070d05c1d71a.tar.xz
ruby-409e8e46faaf6407737a03789d18070d05c1d71a.zip
merges r20372-r20375 and r20380 from trunk into ruby_1_9_1.
* signal.c (register_sigaltstack): minimum size is insufficient for method calls. * signal.c (sigsegv): handles stack overflow if possible. * thread.c (ruby_thread_stack_overflow): helper function to raise sysstack_error. * thread_pthread.c (ruby_stack_overflowed_p): checks for stack overflow. * signal.c (ruby_sigaction_t): added. * signal.c (register_sigaltstack): stores alt stack for debug purpose. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@20422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index b9f7a28cd..25cdde28c 100644
--- a/thread.c
+++ b/thread.c
@@ -1184,6 +1184,14 @@ rb_thread_signal_exit(void *thptr)
rb_thread_raise(2, argv, th->vm->main_thread);
}
+void
+ruby_thread_stack_overflow(rb_thread_t *th)
+{
+ th->errinfo = sysstack_error;
+ th->raised_flag = 0;
+ TH_JUMP_TAG(th, TAG_RAISE);
+}
+
int
rb_thread_set_raised(rb_thread_t *th)
{