diff options
author | takano32 <takano32@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-10 06:57:50 +0000 |
---|---|---|
committer | takano32 <takano32@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-10 06:57:50 +0000 |
commit | 7aa74a0d0a22d74f1b3053280c56501aaf0b1e3c (patch) | |
tree | f6872a24e72e391b435f255ea7f57e89ea56a576 | |
parent | f1fe99b1be202fca2500cb7f7d3d18b045cc73a1 (diff) | |
download | ruby-7aa74a0d0a22d74f1b3053280c56501aaf0b1e3c.tar.gz |
a64: fix crash on register stack mark/sweep pass
* thread_pthread.c: move 'register_stack_start' earlier.
[ruby-core:79928] [Bug #13284] [Fix GH-1625]
Author: Sergei Trofimovich <slyfox@gentoo.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | thread_pthread.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index f652429637..18170c8e16 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -740,6 +740,12 @@ ruby_init_stack(volatile VALUE *addr ) { native_main_thread.id = pthread_self(); +#ifdef __ia64 + if (!native_main_thread.register_stack_start || + (VALUE*)bsp < native_main_thread.register_stack_start) { + native_main_thread.register_stack_start = (VALUE*)bsp; + } +#endif #if MAINSTACKADDR_AVAILABLE if (native_main_thread.stack_maxsize) return; { @@ -763,12 +769,6 @@ ruby_init_stack(volatile VALUE *addr native_main_thread.stack_start = (VALUE *)addr; } #endif -#ifdef __ia64 - if (!native_main_thread.register_stack_start || - (VALUE*)bsp < native_main_thread.register_stack_start) { - native_main_thread.register_stack_start = (VALUE*)bsp; - } -#endif { #if defined(HAVE_GETRLIMIT) #if defined(PTHREAD_STACK_DEFAULT) |