diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-29 12:31:25 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-29 12:31:25 +0000 |
commit | e48d99f0e574a36f0e9c7337b396a437cbff4cc5 (patch) | |
tree | 72f4c1fc3d7756525f8ae3cd93ccec0a59edf52c /eval.c | |
parent | d761c9b178d8a2b7757ca5ea41135c7ea37c70b2 (diff) |
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
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 |