ruby-changes:33040
From: naruse <ko1@a...>
Date: Sat, 22 Feb 2014 16:17:34 +0900 (JST)
Subject: [ruby-changes:33040] naruse:r45119 (ruby_2_1): merge revision(s) 44670, 44671, 44673, 44675: [Backport #8783]
naruse 2014-02-22 16:17:22 +0900 (Sat, 22 Feb 2014) New Revision: 45119 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45119 Log: merge revision(s) 44670,44671,44673,44675: [Backport #8783] thread_pthread.c: timer thread stack size * thread_pthread.c (rb_thread_create_timer_thread): define the stack size for timer thread at compile time. * thread_pthread.c (rb_thread_create_timer_thread): expand timer thread stack size to get rid of segfault on FreeBSD/powerpc64. based on the patch by Steve Wills at [ruby-core:59923]. [ruby-core:56590] [Bug #8783] * thread_pthread.c (rb_thread_create_timer_thread): fix for platforms where PTHREAD_STACK_MIN is a dynamic value and not a compile-time constant. [ruby-dev:47911] [Bug #9436] Modified directories: branches/ruby_2_1/ Modified files: branches/ruby_2_1/ChangeLog branches/ruby_2_1/thread_pthread.c branches/ruby_2_1/version.h Index: ruby_2_1/ChangeLog =================================================================== --- ruby_2_1/ChangeLog (revision 45118) +++ ruby_2_1/ChangeLog (revision 45119) @@ -1,3 +1,16 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1 +Sat Feb 22 15:56:53 2014 Nobuyoshi Nakada <nobu@r...> + + * thread_pthread.c (rb_thread_create_timer_thread): fix for platforms + where PTHREAD_STACK_MIN is a dynamic value and not a compile-time + constant. [ruby-dev:47911] [Bug #9436] + +Sat Feb 22 15:56:53 2014 Nobuyoshi Nakada <nobu@r...> + + * thread_pthread.c (rb_thread_create_timer_thread): expand timer + thread stack size to get rid of segfault on FreeBSD/powerpc64. + based on the patch by Steve Wills at [ruby-core:59923]. + [ruby-core:56590] [Bug #8783] + Sat Feb 22 15:13:38 2014 Benoit Daloze <eregontp@g...> * range.c (Range#size): [DOC] improve description and add examples. Index: ruby_2_1/thread_pthread.c =================================================================== --- ruby_2_1/thread_pthread.c (revision 45118) +++ ruby_2_1/thread_pthread.c (revision 45119) @@ -1479,17 +1479,16 @@ rb_thread_create_timer_thread(void) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/thread_pthread.c#L1479 exit(EXIT_FAILURE); } # ifdef PTHREAD_STACK_MIN - if (PTHREAD_STACK_MIN < 4096 * 3) { + { + const size_t min_size = (4096 * 4); /* Allocate the machine stack for the timer thread - * at least 12KB (3 pages). FreeBSD 8.2 AMD64 causes - * machine stack overflow only with PTHREAD_STACK_MIN. + * at least 16KB (4 pages). FreeBSD 8.2 AMD64 causes + * machine stack overflow only with PTHREAD_STACK_MIN. */ - pthread_attr_setstacksize(&attr, - 4096 * 3 + (THREAD_DEBUG ? BUFSIZ : 0)); - } - else { - pthread_attr_setstacksize(&attr, - PTHREAD_STACK_MIN + (THREAD_DEBUG ? BUFSIZ : 0)); + size_t stack_size = PTHREAD_STACK_MIN; /* may be dynamic, get only once */ + if (stack_size < min_size) stack_size = min_size; + if (THREAD_DEBUG) stack_size += BUFSIZ; + pthread_attr_setstacksize(&attr, stack_size); } # endif #endif Index: ruby_2_1/version.h =================================================================== --- ruby_2_1/version.h (revision 45118) +++ ruby_2_1/version.h (revision 45119) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1 #define RUBY_VERSION "2.1.1" #define RUBY_RELEASE_DATE "2014-02-22" -#define RUBY_PATCHLEVEL 63 +#define RUBY_PATCHLEVEL 64 #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 2 Property changes on: ruby_2_1 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r44670-44671,44673,44675 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/