ruby-changes:29350
From: ko1 <ko1@a...>
Date: Wed, 19 Jun 2013 07:07:20 +0900 (JST)
Subject: [ruby-changes:29350] ko1:r41402 (trunk): * gc.c (rgengc_remember): check T_NONE and T_ZOMBIE
ko1 2013-06-19 07:07:09 +0900 (Wed, 19 Jun 2013) New Revision: 41402 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41402 Log: * gc.c (rgengc_remember): check T_NONE and T_ZOMBIE if RGENGC_CHECK_MODE > 0. Modified files: trunk/ChangeLog trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 41401) +++ ChangeLog (revision 41402) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Jun 19 07:06:21 2013 Koichi Sasada <ko1@a...> + + * gc.c (rgengc_remember): check T_NONE and T_ZOMBIE + if RGENGC_CHECK_MODE > 0. + Wed Jun 19 07:02:19 2013 Koichi Sasada <ko1@a...> * gc.c (RGENGC_CHECK_MODE): add new check mode `3'. Index: gc.c =================================================================== --- gc.c (revision 41401) +++ gc.c (revision 41402) @@ -3632,6 +3632,19 @@ rgengc_remember(rb_objspace_t *objspace, https://github.com/ruby/ruby/blob/trunk/gc.c#L3632 RVALUE_SHADY(obj) ? "shady" : "non-shady", rgengc_remembersetbits_get(objspace, obj) ? "was already remembered" : "is remembered now"); +#if RGENGC_CHECK_MODE > 0 + { + switch (BUILTIN_TYPE(obj)) { + case T_NONE: + case T_ZOMBIE: + rb_bug("rgengc_remember: should not remember %p (%s)\n", + (void *)obj, obj_type_name(obj)); + default: + ; + } + } +#endif + if (RGENGC_PROFILE) { if (!rgengc_remembered(objspace, obj)) { if (!RVALUE_SHADY(obj)) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/