summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-29 08:22:42 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-29 08:22:42 +0000
commit431b9dbd009f47458cd502784fad01983e656ce0 (patch)
treec0ddc60d7a5e9108ad729da3a182747ff235d8be
parentb19d2e9af9c9429f3a84f613432777a6723dd4b7 (diff)
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
-rw-r--r--ChangeLog5
-rw-r--r--thread_pthread.c2
-rw-r--r--version.h2
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 <naruse@ruby-lang.org>
+
+ * thread_pthread.c (reserve_stack): ensure the memory is really
+ allocated. [Bug #11457]
+
Tue Sep 29 17:18:40 2015 NAKAMURA Usaku <usa@ruby-lang.org>
* 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