diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-03 02:28:31 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-03 02:28:31 +0000 |
commit | dcc24cef2c0db0b68bd27ec9df08bbd31a426a6d (patch) | |
tree | ef50d2413c79536c8b2d0270dba5ebb88567f63d /thread_pthread.c | |
parent | 7615362d64e38ef82afd6598ecb68cc7de535e36 (diff) |
thread_pthread.c: check stack on co-routine case
* thread_pthread.c (ruby_init_stack): check stack bounds even if
get_main_stack succeeded, on the "co-routine" case.
https://github.com/ruby/ruby/commit/53953ee#commitcomment-18887413
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r-- | thread_pthread.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index b8be9bddc5..20e4869a50 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -749,7 +749,7 @@ ruby_init_stack(volatile VALUE *addr native_main_thread.stack_maxsize = size; native_main_thread.stack_start = stackaddr; reserve_stack(stackaddr, size); - return; + goto bound_check; } } #endif @@ -797,6 +797,9 @@ ruby_init_stack(volatile VALUE *addr #endif } +#if MAINSTACKADDR_AVAILABLE + bound_check: +#endif /* If addr is out of range of main-thread stack range estimation, */ /* it should be on co-routine (alternative stack). [Feature #2294] */ { |