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

ruby-changes:22022

From: ngoto <ko1@a...>
Date: Sun, 18 Dec 2011 18:58:53 +0900 (JST)
Subject: [ruby-changes:22022] ngoto:r34071 (trunk): * vm.c (vm_define_method): improve guard of iseq from GC. Fix

ngoto	2011-12-18 18:58:31 +0900 (Sun, 18 Dec 2011)

  New Revision: 34071

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

  Log:
    * vm.c (vm_define_method): improve guard of iseq from GC.  Fix
      failure or segmentation fault in test_singleton_method(TestGc)
      on sparc Solaris10 compiled with Oracle Solaris Studio 12.2.
      [Bug #5762] [ruby-dev:45000] [Bug #4178]

  Modified files:
    trunk/ChangeLog
    trunk/vm.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 34070)
+++ ChangeLog	(revision 34071)
@@ -1,3 +1,10 @@
+Sun Dec 18 18:52:37 2011  Naohisa Goto  <ngotogenome@g...>
+
+	* vm.c (vm_define_method): improve guard of iseq from GC.  Fix
+	  failure or segmentation fault in test_singleton_method(TestGc)
+	  on sparc Solaris10 compiled with Oracle Solaris Studio 12.2.
+	  [Bug #5762] [ruby-dev:45000] [Bug #4178]
+
 Sun Dec 18 14:34:31 2011  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/bigdecimal/bigdecimal.c (Init_bigdecimal): does not follow
Index: vm.c
===================================================================
--- vm.c	(revision 34070)
+++ vm.c	(revision 34071)
@@ -1912,8 +1912,7 @@
     GetISeqPtr(iseqval, miseq);
 
     if (miseq->klass) {
-	iseqval = rb_iseq_clone(iseqval, 0);
-	RB_GC_GUARD(iseqval);
+	RB_GC_GUARD(iseqval) = rb_iseq_clone(iseqval, 0);
 	GetISeqPtr(iseqval, miseq);
     }
 

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

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