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

ruby-changes:54665

From: nagachika <ko1@a...>
Date: Sun, 20 Jan 2019 19:48:31 +0900 (JST)
Subject: [ruby-changes:54665] nagachika:r66881 (ruby_2_5): merge revision(s) 64879: [Backport #15162]

nagachika	2019-01-20 19:48:26 +0900 (Sun, 20 Jan 2019)

  New Revision: 66881

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

  Log:
    merge revision(s) 64879: [Backport #15162]
    
    transcode.c: add GC guard on raise
    
    * transcode.c (econv_s_search_convpath): add GC guard to fix SEGV
      on raise.
      [Bug #15162] [ruby-core:89172]

  Modified directories:
    branches/ruby_2_5/
  Modified files:
    branches/ruby_2_5/transcode.c
    branches/ruby_2_5/version.h
Index: ruby_2_5/transcode.c
===================================================================
--- ruby_2_5/transcode.c	(revision 66880)
+++ ruby_2_5/transcode.c	(revision 66881)
@@ -3150,8 +3150,12 @@ econv_s_search_convpath(int argc, VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_5/transcode.c#L3150
     convpath = Qnil;
     transcode_search_path(sname, dname, search_convpath_i, &convpath);
 
-    if (NIL_P(convpath))
-        rb_exc_raise(rb_econv_open_exc(sname, dname, ecflags));
+    if (NIL_P(convpath)) {
+	VALUE exc = rb_econv_open_exc(sname, dname, ecflags);
+	RB_GC_GUARD(snamev);
+	RB_GC_GUARD(dnamev);
+	rb_exc_raise(exc);
+    }
 
     if (decorate_convpath(convpath, ecflags) == -1) {
 	VALUE exc = rb_econv_open_exc(sname, dname, ecflags);
Index: ruby_2_5/version.h
===================================================================
--- ruby_2_5/version.h	(revision 66880)
+++ ruby_2_5/version.h	(revision 66881)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_5/version.h#L1
 #define RUBY_VERSION "2.5.4"
 #define RUBY_RELEASE_DATE "2019-01-20"
-#define RUBY_PATCHLEVEL 136
+#define RUBY_PATCHLEVEL 137
 
 #define RUBY_RELEASE_YEAR 2019
 #define RUBY_RELEASE_MONTH 1
Index: ruby_2_5
===================================================================
--- ruby_2_5	(revision 66880)
+++ ruby_2_5	(revision 66881)

Property changes on: ruby_2_5
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,1 ##
   Merged /trunk:r64879

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

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