summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-29 18:32:49 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-29 18:32:49 +0000
commit6ce7bd6f919188381e14476feba929b227fda014 (patch)
tree2bc287e142828bc8f5df9744bd605314e89ba323 /thread_pthread.c
parentd93cfe5d9ec178cf4a460eae2220aa044b5ce99b (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_2@51985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 5fcad19ebd..2a47efedd3 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;
}
}
}