merge revision(s) 36251:

* eval.c (stack_extend): prevent ALLOCA_N, which reserves a memory
	  space with for restoring machine stack stored in each threads, from
	  optimization out.  backport r34278 from the trunk.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@36253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shyouhei 2012-06-29 12:31:25 +00:00
parent d761c9b178
commit e48d99f0e5
3 changed files with 12 additions and 4 deletions

2
eval.c
View file

@ -10824,6 +10824,7 @@ stack_extend(rb_thread_t th, int exit)
if (space > th->stk_pos) {
# ifdef HAVE_ALLOCA
sp = ALLOCA_N(VALUE, &space[0] - th->stk_pos);
space[0] = *sp;
# else
stack_extend(th, exit);
# endif
@ -10838,6 +10839,7 @@ stack_extend(rb_thread_t th, int exit)
if (&space[STACK_PAD_SIZE] < th->stk_pos + th->stk_len) {
# ifdef HAVE_ALLOCA
sp = ALLOCA_N(VALUE, th->stk_pos + th->stk_len - &space[STACK_PAD_SIZE]);
space[0] = *sp;
# else
stack_extend(th, exit);
# endif