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

ruby-changes:32258

From: usa <ko1@a...>
Date: Sun, 22 Dec 2013 14:14:26 +0900 (JST)
Subject: [ruby-changes:32258] usa:r44337 (ruby_1_9_3): * object.c (rb_obj_clone): protect FL_MARK of a dest object. A lazy

usa	2013-12-22 14:14:19 +0900 (Sun, 22 Dec 2013)

  New Revision: 44337

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

  Log:
    * object.c (rb_obj_clone): protect FL_MARK of a dest object. A lazy
      sweeper free up a dest object if a marker is invoked immediately
      following allocate a dest object in rb_obj_alloc().
      [Backport #9206]

  Modified files:
    branches/ruby_1_9_3/ChangeLog
    branches/ruby_1_9_3/object.c
    branches/ruby_1_9_3/version.h
Index: ruby_1_9_3/ChangeLog
===================================================================
--- ruby_1_9_3/ChangeLog	(revision 44336)
+++ ruby_1_9_3/ChangeLog	(revision 44337)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/ChangeLog#L1
+Tue Dec  3 18:36:42 2013  Narihiro Nakamura  <authornari@g...>
+
+	* object.c (rb_obj_clone): protect FL_MARK of a dest object. A lazy
+	  sweeper free up a dest object if a marker is invoked immediately
+	  following allocate a dest object in rb_obj_alloc().
+	  [Backport #9206]
+
 Sun Dec 22 13:35:58 2013  NAKAMURA Usaku  <usa@r...>
 
 	* lib/rubygems.rb: 1.8.23.2.
Index: ruby_1_9_3/object.c
===================================================================
--- ruby_1_9_3/object.c	(revision 44336)
+++ ruby_1_9_3/object.c	(revision 44337)
@@ -285,7 +285,7 @@ rb_obj_clone(VALUE obj) https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/object.c#L285
     }
     clone = rb_obj_alloc(rb_obj_class(obj));
     RBASIC(clone)->klass = rb_singleton_class_clone(obj);
-    RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT) | FL_TEST(clone, FL_UNTRUSTED)) & ~(FL_FREEZE|FL_FINALIZE|FL_MARK);
+    RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT) | FL_TEST(clone, FL_UNTRUSTED)) & ~(FL_FREEZE|FL_FINALIZE|FL_MARK) | (RBASIC(clone)->flags&FL_MARK);
     init_copy(clone, obj);
     rb_funcall(clone, id_init_clone, 1, obj);
     RBASIC(clone)->flags |= RBASIC(obj)->flags & FL_FREEZE;
Index: ruby_1_9_3/version.h
===================================================================
--- ruby_1_9_3/version.h	(revision 44336)
+++ ruby_1_9_3/version.h	(revision 44337)
@@ -1,5 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/version.h#L1
 #define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 486
+#define RUBY_PATCHLEVEL 487
 
 #define RUBY_RELEASE_DATE "2013-12-22"
 #define RUBY_RELEASE_YEAR 2013

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

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