ruby-changes:47192
From: takano32 <ko1@a...>
Date: Mon, 10 Jul 2017 15:57:55 +0900 (JST)
Subject: [ruby-changes:47192] takano32:r59307 (trunk): a64: fix crash on register stack mark/sweep pass
takano32 2017-07-10 15:57:50 +0900 (Mon, 10 Jul 2017) New Revision: 59307 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59307 Log: 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@g...> Modified files: trunk/thread_pthread.c Index: thread_pthread.c =================================================================== --- thread_pthread.c (revision 59306) +++ thread_pthread.c (revision 59307) @@ -740,6 +740,12 @@ ruby_init_stack(volatile VALUE *addr https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L740 ) { 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 https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L769 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/