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

ruby-changes:43846

From: nagachika <ko1@a...>
Date: Tue, 16 Aug 2016 13:29:43 +0900 (JST)
Subject: [ruby-changes:43846] nagachika:r55919 (ruby_2_3): merge revision(s) 55663: [Backport #12583]

nagachika	2016-08-16 13:29:37 +0900 (Tue, 16 Aug 2016)

  New Revision: 55919

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55919

  Log:
    merge revision(s) 55663: [Backport #12583]
    
    * gc.c (gc_mark_roots): should mark the VM object itself to mark
      singleton class of the VM object.
      Before this patch, we only set mark bit for the VM object and
      invoke mark function separately.
      [Bug #12583]
    
    * test/ruby/test_gc.rb: add a test.

  Modified directories:
    branches/ruby_2_3/
  Modified files:
    branches/ruby_2_3/ChangeLog
    branches/ruby_2_3/gc.c
    branches/ruby_2_3/test/ruby/test_gc.rb
    branches/ruby_2_3/version.h
Index: ruby_2_3/test/ruby/test_gc.rb
===================================================================
--- ruby_2_3/test/ruby/test_gc.rb	(revision 55918)
+++ ruby_2_3/test/ruby/test_gc.rb	(revision 55919)
@@ -397,4 +397,11 @@ class TestGc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/ruby/test_gc.rb#L397
       GC.enable unless disabled
     end
   end
+
+  def test_vm_object
+    assert_normal_exit <<-'end', '[Bug #12583]'
+      ObjectSpace.each_object{|o| o.singleton_class rescue 0}
+      ObjectSpace.each_object{|o| case o when Module then o.instance_methods end}
+    end
+  end
 end
Index: ruby_2_3/version.h
===================================================================
--- ruby_2_3/version.h	(revision 55918)
+++ ruby_2_3/version.h	(revision 55919)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1
 #define RUBY_VERSION "2.3.2"
 #define RUBY_RELEASE_DATE "2016-08-16"
-#define RUBY_PATCHLEVEL 166
+#define RUBY_PATCHLEVEL 167
 
 #define RUBY_RELEASE_YEAR 2016
 #define RUBY_RELEASE_MONTH 8
Index: ruby_2_3/gc.c
===================================================================
--- ruby_2_3/gc.c	(revision 55918)
+++ ruby_2_3/gc.c	(revision 55919)
@@ -4642,7 +4642,7 @@ gc_mark_roots(rb_objspace_t *objspace, c https://github.com/ruby/ruby/blob/trunk/ruby_2_3/gc.c#L4642
     MARK_CHECKPOINT("vm");
     SET_STACK_END;
     rb_vm_mark(th->vm);
-    if (th->vm->self) gc_mark_set(objspace, th->vm->self);
+    if (th->vm->self) gc_mark(objspace, th->vm->self);
 
     MARK_CHECKPOINT("finalizers");
     mark_tbl(objspace, finalizer_table);
Index: ruby_2_3/ChangeLog
===================================================================
--- ruby_2_3/ChangeLog	(revision 55918)
+++ ruby_2_3/ChangeLog	(revision 55919)
@@ -1,3 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1
+Tue Aug 16 12:27:48 2016  Koichi Sasada  <ko1@a...>
+
+	* gc.c (gc_mark_roots): should mark the VM object itself to mark
+	  singleton class of the VM object.
+	  Before this patch, we only set mark bit for the VM object and
+	  invoke mark function separately.
+	  [Bug #12583]
+
+	* test/ruby/test_gc.rb: add a test.
+
 Tue Aug 16 12:01:35 2016  Naohisa Goto  <ngotogenome@g...>
 
 	* ext/digest/md5/md5ossl.h: Remove excess semicolons.

Property changes on: ruby_2_3
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r55663


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

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