aboutsummaryrefslogtreecommitdiffstats
path: root/vm_eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-17 00:10:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-17 00:10:47 +0000
commit3f56d79882b4ce3abe8df7948669874fa70b47a8 (patch)
tree7babbcd6f970afd9409bd6e7bd4a3e2c567bb541 /vm_eval.c
parent8812890be81b59700c9e11dbb62765286277974d (diff)
downloadruby-3f56d79882b4ce3abe8df7948669874fa70b47a8.tar.gz
gc.c: rb_threadptr_stack_check
* gc.c (rb_threadptr_stack_check): check probability of stack overflow for the given thread, not the current thread. * vm_eval.c (stack_check): check the given thread, not the current thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_eval.c')
-rw-r--r--vm_eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vm_eval.c b/vm_eval.c
index 3ea0b8d921..2713af0550 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -300,7 +300,8 @@ rb_current_receiver(void)
static inline void
stack_check(rb_thread_t *th)
{
- if (!rb_thread_raised_p(th, RAISED_STACKOVERFLOW) && ruby_stack_check()) {
+ if (!rb_thread_raised_p(th, RAISED_STACKOVERFLOW) &&
+ rb_threadptr_stack_check(th)) {
rb_thread_raised_set(th, RAISED_STACKOVERFLOW);
rb_exc_raise(sysstack_error);
}