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

ruby-changes:43355

From: nobu <ko1@a...>
Date: Thu, 16 Jun 2016 16:35:42 +0900 (JST)
Subject: [ruby-changes:43355] nobu:r55429 (trunk): prevent rb_cObject from GC

nobu	2016-06-16 16:35:37 +0900 (Thu, 16 Jun 2016)

  New Revision: 55429

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

  Log:
    prevent rb_cObject from GC
    
    * class.c (Init_class_hierarchy): prevent rb_cObject which is the
      class tree root, from GC.  [ruby-dev:49666] [Bug #12492]

  Modified files:
    trunk/ChangeLog
    trunk/class.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 55428)
+++ ChangeLog	(revision 55429)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Jun 16 16:35:35 2016  Nobuyoshi Nakada  <nobu@r...>
+
+	* class.c (Init_class_hierarchy): prevent rb_cObject which is the
+	  class tree root, from GC.  [ruby-dev:49666] [Bug #12492]
+
 Thu Jun 16 12:17:52 2016  Nobuyoshi Nakada  <nobu@r...>
 
 	* string.c (tr_trans): adjust buffer size by processed and rest
Index: class.c
===================================================================
--- class.c	(revision 55428)
+++ class.c	(revision 55429)
@@ -547,6 +547,7 @@ Init_class_hierarchy(void) https://github.com/ruby/ruby/blob/trunk/class.c#L547
 {
     rb_cBasicObject = boot_defclass("BasicObject", 0);
     rb_cObject = boot_defclass("Object", rb_cBasicObject);
+    rb_gc_register_mark_object(rb_cObject);
 
     /* resolve class name ASAP for order-independence */
     rb_class_name(rb_cObject);

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

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