[前][次][番号順一覧][スレッド一覧]

ruby-changes:24200

From: nobu <ko1@a...>
Date: Fri, 29 Jun 2012 21:19:50 +0900 (JST)
Subject: [ruby-changes:24200] nobu:r36251 (ruby_1_8): stack_extend

nobu	2012-06-29 21:19:39 +0900 (Fri, 29 Jun 2012)

  New Revision: 36251

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36251

  Log:
    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.

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/eval.c

Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 36250)
+++ ruby_1_8/ChangeLog	(revision 36251)
@@ -1,3 +1,9 @@
+Fri Jun 29 21:19:36 2012  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@i...>
 
 	* ext/syslog/syslog.c (mSyslog_inspect): Make sure self is a
Index: ruby_1_8/eval.c
===================================================================
--- ruby_1_8/eval.c	(revision 36250)
+++ ruby_1_8/eval.c	(revision 36251)
@@ -11040,6 +11040,7 @@
 	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 @@
 	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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]