ruby-changes:37946
From: ko1 <ko1@a...>
Date: Thu, 19 Mar 2015 21:27:09 +0900 (JST)
Subject: [ruby-changes:37946] ko1:r50027 (trunk): * gc.c (rb_copy_wb_protected_attribute): demote `dest' object.
ko1 2015-03-19 21:26:49 +0900 (Thu, 19 Mar 2015) New Revision: 50027 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50027 Log: * gc.c (rb_copy_wb_protected_attribute): demote `dest' object. Modified files: trunk/ChangeLog trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 50026) +++ ChangeLog (revision 50027) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Mar 19 21:25:25 2015 Koichi Sasada <ko1@a...> + + * gc.c (rb_copy_wb_protected_attribute): demote `dest' object. + Thu Mar 19 16:18:00 2015 Koichi Sasada <ko1@a...> * gc.c, internal.h: export rb_gc_verify_internal_consistency(). Index: gc.c =================================================================== --- gc.c (revision 50026) +++ gc.c (revision 50027) @@ -5734,13 +5734,18 @@ rb_copy_wb_protected_attribute(VALUE des https://github.com/ruby/ruby/blob/trunk/gc.c#L5734 #if USE_RGENGC rb_objspace_t *objspace = &rb_objspace; + if (RGENGC_CHECK_MODE > 0 && RVALUE_WB_UNPROTECTED(dest)) { + rb_bug("rb_copy_wb_protected_attribute: dest should not be WB unprotected - %s", + obj_info(dest)); + } + if (RVALUE_WB_UNPROTECTED(obj)) { if (!RVALUE_OLD_P(dest)) { MARK_IN_BITMAP(GET_HEAP_WB_UNPROTECTED_BITS(dest), dest); RVALUE_AGE_RESET_RAW(dest); } else { - RVALUE_DEMOTE(objspace, obj); + RVALUE_DEMOTE(objspace, dest); } } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/