summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-18 11:21:50 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-18 11:21:50 +0000
commit3816f7574f1142e6bd9eb4117782d6df85959960 (patch)
treef74822d51be77b957ed211ec58ec63e4e9ce987e
parent0958af2ad4e83400f35c296e9ed9cf021b1675b4 (diff)
* thread_pthread.c (reserve_stack): ensure the memory is really
allocated. [Bug #11457] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--thread_pthread.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c817273fa..ae4f8a24aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Aug 18 20:05:49 2015 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * thread_pthread.c (reserve_stack): ensure the memory is really
+ allocated. [Bug #11457]
+
Tue Aug 18 17:19:21 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (IS_BEG): include labeled argument state, which was
diff --git a/thread_pthread.c b/thread_pthread.c
index 0f6e0fdbce..0446501d14 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -686,8 +686,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;
}
}
}