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

ruby-changes:43848

From: usa <ko1@a...>
Date: Tue, 16 Aug 2016 13:36:48 +0900 (JST)
Subject: [ruby-changes:43848] usa:r55921 (ruby_2_2): merge revision(s) 55663: [Backport #12583]

usa	2016-08-16 13:36:44 +0900 (Tue, 16 Aug 2016)

  New Revision: 55921

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

  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_2/
  Modified files:
    branches/ruby_2_2/ChangeLog
    branches/ruby_2_2/gc.c
    branches/ruby_2_2/test/ruby/test_gc.rb
    branches/ruby_2_2/version.h
Index: ruby_2_2/gc.c
===================================================================
--- ruby_2_2/gc.c	(revision 55920)
+++ ruby_2_2/gc.c	(revision 55921)
@@ -4389,7 +4389,7 @@ gc_mark_roots(rb_objspace_t *objspace, c https://github.com/ruby/ruby/blob/trunk/ruby_2_2/gc.c#L4389
     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_2/version.h
===================================================================
--- ruby_2_2/version.h	(revision 55920)
+++ ruby_2_2/version.h	(revision 55921)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1
 #define RUBY_VERSION "2.2.6"
 #define RUBY_RELEASE_DATE "2016-08-16"
-#define RUBY_PATCHLEVEL 349
+#define RUBY_PATCHLEVEL 350
 
 #define RUBY_RELEASE_YEAR 2016
 #define RUBY_RELEASE_MONTH 8
Index: ruby_2_2/test/ruby/test_gc.rb
===================================================================
--- ruby_2_2/test/ruby/test_gc.rb	(revision 55920)
+++ ruby_2_2/test/ruby/test_gc.rb	(revision 55921)
@@ -377,4 +377,11 @@ class TestGc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_2/test/ruby/test_gc.rb#L377
       C.new
     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_2/ChangeLog
===================================================================
--- ruby_2_2/ChangeLog	(revision 55920)
+++ ruby_2_2/ChangeLog	(revision 55921)
@@ -1,3 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1
+Tue Aug 16 13:36:00 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 13:29:25 2016  NAKAMURA Usaku  <usa@r...>
 
 	* lib/rubygems/package.rb: Fixed potential perms issue unpacking of

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


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

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