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

ruby-changes:31423

From: nobu <ko1@a...>
Date: Fri, 1 Nov 2013 17:25:43 +0900 (JST)
Subject: [ruby-changes:31423] nobu:r43502 (trunk): gc.c: zombie is not alive

nobu	2013-11-01 17:25:34 +0900 (Fri, 01 Nov 2013)

  New Revision: 43502

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

  Log:
    gc.c: zombie is not alive
    
    * gc.c (is_live_object): finalizer may not run because of lazy-sweep.
      [ruby-dev:47786] [Bug #9069]

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43501)
+++ ChangeLog	(revision 43502)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Nov  1 17:25:30 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* gc.c (is_live_object): finalizer may not run because of lazy-sweep.
+	  [ruby-dev:47786] [Bug #9069]
+
 Fri Nov  1 16:55:52 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* string.c (rb_str_scrub): export with fixed length arguments, and
Index: gc.c
===================================================================
--- gc.c	(revision 43501)
+++ gc.c	(revision 43502)
@@ -2050,7 +2050,10 @@ is_dead_object(rb_objspace_t *objspace, https://github.com/ruby/ruby/blob/trunk/gc.c#L2050
 static inline int
 is_live_object(rb_objspace_t *objspace, VALUE ptr)
 {
-    if (BUILTIN_TYPE(ptr) == 0) return FALSE;
+    switch (BUILTIN_TYPE(ptr)) {
+      case 0: case T_ZOMBIE:
+	return FALSE;
+    }
     if (RBASIC(ptr)->klass == 0) return FALSE;
     if (is_dead_object(objspace, ptr)) return FALSE;
     return TRUE;

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

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