mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
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.
53953ee (commitcomment-18887413)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7615362d64
commit
dcc24cef2c
2 changed files with 10 additions and 1 deletions
|
@ -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] */
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue