mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@66881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a88ab94e75
commit
e42dcdb515
2 changed files with 7 additions and 3 deletions
|
@ -3150,8 +3150,12 @@ econv_s_search_convpath(int argc, VALUE *argv, VALUE klass)
|
||||||
convpath = Qnil;
|
convpath = Qnil;
|
||||||
transcode_search_path(sname, dname, search_convpath_i, &convpath);
|
transcode_search_path(sname, dname, search_convpath_i, &convpath);
|
||||||
|
|
||||||
if (NIL_P(convpath))
|
if (NIL_P(convpath)) {
|
||||||
rb_exc_raise(rb_econv_open_exc(sname, dname, ecflags));
|
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) {
|
if (decorate_convpath(convpath, ecflags) == -1) {
|
||||||
VALUE exc = rb_econv_open_exc(sname, dname, ecflags);
|
VALUE exc = rb_econv_open_exc(sname, dname, ecflags);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#define RUBY_VERSION "2.5.4"
|
#define RUBY_VERSION "2.5.4"
|
||||||
#define RUBY_RELEASE_DATE "2019-01-20"
|
#define RUBY_RELEASE_DATE "2019-01-20"
|
||||||
#define RUBY_PATCHLEVEL 136
|
#define RUBY_PATCHLEVEL 137
|
||||||
|
|
||||||
#define RUBY_RELEASE_YEAR 2019
|
#define RUBY_RELEASE_YEAR 2019
|
||||||
#define RUBY_RELEASE_MONTH 1
|
#define RUBY_RELEASE_MONTH 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue