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

ruby-changes:34374

From: ko1 <ko1@a...>
Date: Tue, 17 Jun 2014 12:27:40 +0900 (JST)
Subject: [ruby-changes:34374] ko1:r46455 (trunk): * gc.c (obj_memsize_of): memsize_of(T_ZOMBIE) returns 0, not a rb_bug.

ko1	2014-06-17 12:27:26 +0900 (Tue, 17 Jun 2014)

  New Revision: 46455

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

  Log:
    * gc.c (obj_memsize_of): memsize_of(T_ZOMBIE) returns 0, not a rb_bug.
      ObjectSpace.count_objects_size() uses memsize_of(T_ZOMBIE).
      This bug introduced at r46348.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46454)
+++ ChangeLog	(revision 46455)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Jun 17 12:24:57 2014  Koichi Sasada  <ko1@a...>
+
+	* gc.c (obj_memsize_of): memsize_of(T_ZOMBIE) returns 0, not a rb_bug.
+	  ObjectSpace.count_objects_size() uses memsize_of(T_ZOMBIE).
+
+	  This bug introduced at r46348.
+
 Mon Jun 16 19:00:11 2014  Koichi Sasada  <ko1@a...>
 
 	* test/runner.rb: failure message should be passed as an argument.
Index: gc.c
===================================================================
--- gc.c	(revision 46454)
+++ gc.c	(revision 46455)
@@ -2610,7 +2610,7 @@ obj_memsize_of(VALUE obj, int use_tdata) https://github.com/ruby/ruby/blob/trunk/gc.c#L2610
 	break;
 
       case T_ZOMBIE:
-	/* fall through */
+	break;
 
       default:
 	rb_bug("objspace/memsize_of(): unknown data type 0x%x(%p)",

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

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