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

ruby-changes:38490

From: usa <ko1@a...>
Date: Thu, 21 May 2015 09:49:51 +0900 (JST)
Subject: [ruby-changes:38490] usa:r50571 (ruby_2_1): merge revision(s) 49792: [Backport #10918]

usa	2015-05-21 09:49:44 +0900 (Thu, 21 May 2015)

  New Revision: 50571

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

  Log:
    merge revision(s) 49792: [Backport #10918]
    
    * gc.c (id2ref): prohibit from accessing internal objects.
      [ruby-core:68348] [Bug #10918]

  Modified directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/gc.c
    branches/ruby_2_1/version.h
Index: ruby_2_1/ChangeLog
===================================================================
--- ruby_2_1/ChangeLog	(revision 50570)
+++ ruby_2_1/ChangeLog	(revision 50571)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Thu May 21 09:49:01 2015  Nobuyoshi Nakada  <nobu@r...>
+
+	* gc.c (id2ref): prohibit from accessing internal objects.
+	  [ruby-core:68348] [Bug #10918]
+
 Thu May 21 09:46:58 2015  Rei Odaira  <Rei.Odaira@g...>
 
 	* ext/pty/pty.c: AIX supports autopush.
Index: ruby_2_1/gc.c
===================================================================
--- ruby_2_1/gc.c	(revision 50570)
+++ ruby_2_1/gc.c	(revision 50571)
@@ -2332,6 +2332,9 @@ id2ref(VALUE obj, VALUE objid) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/gc.c#L2332
     if (!is_live_object(objspace, ptr)) {
 	rb_raise(rb_eRangeError, "%p is recycled object", p0);
     }
+    if (RBASIC(ptr)->klass == 0) {
+	rb_raise(rb_eRangeError, "%p is internal object", p0);
+    }
     return (VALUE)ptr;
 }
 
Index: ruby_2_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 50570)
+++ ruby_2_1/version.h	(revision 50571)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.7"
 #define RUBY_RELEASE_DATE "2015-05-21"
-#define RUBY_PATCHLEVEL 346
+#define RUBY_PATCHLEVEL 347
 
 #define RUBY_RELEASE_YEAR 2015
 #define RUBY_RELEASE_MONTH 5

Property changes on: ruby_2_1
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r49792


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

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