From 431b9dbd009f47458cd502784fad01983e656ce0 Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 29 Sep 2015 08:22:42 +0000 Subject: merge revision(s) 51626: [Backport #11457] * thread_pthread.c (reserve_stack): ensure the memory is really allocated. [Bug #11457] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@51975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ thread_pthread.c | 2 +- version.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 909b0c2776..97580c75ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Sep 29 17:20:07 2015 NARUSE, Yui + + * thread_pthread.c (reserve_stack): ensure the memory is really + allocated. [Bug #11457] + Tue Sep 29 17:18:40 2015 NAKAMURA Usaku * version.h (RUBY_VERSION): bump RUBY_VERSION to 2.1.8. diff --git a/thread_pthread.c b/thread_pthread.c index ed4880c40c..968c644897 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -681,8 +681,8 @@ reserve_stack(volatile char *limit, size_t size) limit -= size; if (buf > limit) { limit = alloca(buf - limit); + limit[0] = 0; /* ensure alloca is called */ limit -= stack_check_margin; - limit[0] = 0; } } } diff --git a/version.h b/version.h index 8ce62c1e67..fc641a118f 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.1.8" #define RUBY_RELEASE_DATE "2015-09-29" -#define RUBY_PATCHLEVEL 401 +#define RUBY_PATCHLEVEL 402 #define RUBY_RELEASE_YEAR 2015 #define RUBY_RELEASE_MONTH 9 -- cgit v1.2.3