aboutsummaryrefslogtreecommitdiffstats
path: root/thread_pthread.c
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
commitb6b1ee3d49b90174c5d02ce70fe815f56818f663 (patch)
treef74822d51be77b957ed211ec58ec63e4e9ce987e /thread_pthread.c
parent6c0deb7b87ec4b1e586de59e320e27d648b0e2bb (diff)
downloadruby-b6b1ee3d49b90174c5d02ce70fe815f56818f663.tar.gz
* 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
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 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;
}
}
}