stack_extend

* 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@36251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-06-29 12:19:39 +00:00
parent 1c8167781f
commit bdaaae417a
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,9 @@
Fri Jun 29 21:19:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* 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.
Mon May 21 16:29:47 2012 Akinori MUSHA <knu@iDaemons.org>
* ext/syslog/syslog.c (mSyslog_inspect): Make sure self is a

2
eval.c
View file

@ -11040,6 +11040,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
@ -11054,6 +11055,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