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

ruby-changes:38727

From: usa <ko1@a...>
Date: Tue, 9 Jun 2015 16:29:04 +0900 (JST)
Subject: [ruby-changes:38727] usa:r50808 (ruby_2_1): merge revision(s) 50646: [Backport #11185]

usa	2015-06-09 16:28:56 +0900 (Tue, 09 Jun 2015)

  New Revision: 50808

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

  Log:
    merge revision(s) 50646: [Backport #11185]
    
    * ext/openssl/ossl_asn1.c (ossl_asn1_traverse, ossl_asn1_decode,
      ossl_asn1_decode_all): use RB_GC_GUARD instead of volatile
      [ruby-core:69371] [Bug #11185]

  Modified directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/ext/openssl/ossl_asn1.c
    branches/ruby_2_1/version.h
Index: ruby_2_1/ChangeLog
===================================================================
--- ruby_2_1/ChangeLog	(revision 50807)
+++ ruby_2_1/ChangeLog	(revision 50808)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Tue Jun  9 16:26:48 2015  Eric Wong  <e@8...>
+
+	* ext/openssl/ossl_asn1.c (ossl_asn1_traverse, ossl_asn1_decode,
+	  ossl_asn1_decode_all): use RB_GC_GUARD instead of volatile
+	  [ruby-core:69371] [Bug #11185]
+
 Tue Jun  9 16:24:25 2015  NARUSE, Yui  <naruse@r...>
 
 	* win32/win32.c (setup_overlapped): seek to the file end only when
Index: ruby_2_1/ext/openssl/ossl_asn1.c
===================================================================
--- ruby_2_1/ext/openssl/ossl_asn1.c	(revision 50807)
+++ ruby_2_1/ext/openssl/ossl_asn1.c	(revision 50808)
@@ -1029,7 +1029,7 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/openssl/ossl_asn1.c#L1029
 ossl_asn1_traverse(VALUE self, VALUE obj)
 {
     unsigned char *p;
-    volatile VALUE tmp;
+    VALUE tmp;
     long len, read = 0, offset = 0;
 
     obj = ossl_to_der_if_possible(obj);
@@ -1037,6 +1037,7 @@ ossl_asn1_traverse(VALUE self, VALUE obj https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/openssl/ossl_asn1.c#L1037
     p = (unsigned char *)RSTRING_PTR(tmp);
     len = RSTRING_LEN(tmp);
     ossl_asn1_decode0(&p, len, &offset, 0, 1, &read);
+    RB_GC_GUARD(tmp);
     int_ossl_decode_sanity_check(len, read, offset);
     return Qnil;
 }
@@ -1058,7 +1059,7 @@ ossl_asn1_decode(VALUE self, VALUE obj) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/openssl/ossl_asn1.c#L1059
 {
     VALUE ret;
     unsigned char *p;
-    volatile VALUE tmp;
+    VALUE tmp;
     long len, read = 0, offset = 0;
 
     obj = ossl_to_der_if_possible(obj);
@@ -1066,6 +1067,7 @@ ossl_asn1_decode(VALUE self, VALUE obj) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/openssl/ossl_asn1.c#L1067
     p = (unsigned char *)RSTRING_PTR(tmp);
     len = RSTRING_LEN(tmp);
     ret = ossl_asn1_decode0(&p, len, &offset, 0, 0, &read);
+    RB_GC_GUARD(tmp);
     int_ossl_decode_sanity_check(len, read, offset);
     return ret;
 }
@@ -1089,7 +1091,7 @@ ossl_asn1_decode_all(VALUE self, VALUE o https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/openssl/ossl_asn1.c#L1091
     VALUE ary, val;
     unsigned char *p;
     long len, tmp_len = 0, read = 0, offset = 0;
-    volatile VALUE tmp;
+    VALUE tmp;
 
     obj = ossl_to_der_if_possible(obj);
     tmp = rb_str_new4(StringValue(obj));
@@ -1104,6 +1106,7 @@ ossl_asn1_decode_all(VALUE self, VALUE o https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/openssl/ossl_asn1.c#L1106
 	read += tmp_read;
 	tmp_len -= tmp_read;
     }
+    RB_GC_GUARD(tmp);
     int_ossl_decode_sanity_check(len, read, offset);
     return ary;
 }
Index: ruby_2_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 50807)
+++ ruby_2_1/version.h	(revision 50808)
@@ -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-06-09"
-#define RUBY_PATCHLEVEL 364
+#define RUBY_PATCHLEVEL 365
 
 #define RUBY_RELEASE_YEAR 2015
 #define RUBY_RELEASE_MONTH 6

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


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

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