diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-29 12:19:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-29 12:19:39 +0000 |
commit | bdaaae417ae26594ca04956704a132c5012da4c9 (patch) | |
tree | 65f1bcc8d06d5c3dd252348ebcf704f8540012ec | |
parent | 1c8167781fcc8fe306e313bb174602d9d60b6da7 (diff) | |
download | ruby-bdaaae417ae26594ca04956704a132c5012da4c9.tar.gz |
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
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | eval.c | 2 |
2 files changed, 8 insertions, 0 deletions
@@ -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 @@ -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 |