mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 09:33:59 +02:00
merge revision(s) r44670,r44671,r44673,r44675: [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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
46561d573e
commit
b8cab3fc3b
3 changed files with 22 additions and 10 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
Mon Feb 17 00:59:40 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* 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]
|
||||
|
||||
Mon Feb 17 00:59:40 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* 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]
|
||||
|
||||
Mon Feb 17 00:45:44 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* string.c (rb_str_modify_expand): enable capacity and disable
|
||||
|
|
|
@ -1420,17 +1420,16 @@ rb_thread_create_timer_thread(void)
|
|||
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
|
||||
* 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#define RUBY_VERSION "2.0.0"
|
||||
#define RUBY_RELEASE_DATE "2014-02-17"
|
||||
#define RUBY_PATCHLEVEL 424
|
||||
#define RUBY_PATCHLEVEL 425
|
||||
|
||||
#define RUBY_RELEASE_YEAR 2014
|
||||
#define RUBY_RELEASE_MONTH 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue