diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-08-09 12:17:24 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-08-09 12:17:24 +0000 |
commit | ecc889b1c8a9175c82f97749b87e3c06357e3cb6 (patch) | |
tree | 92348b01ba01754645fe97754f1e52db5cd8f789 | |
parent | 8bf48ec3070c812178f83c34b083bc4126c5c2bd (diff) |
merge revision(s) 57634: [Backport #13150]
marshal.c: revert r57631 partially
* marshal.c (rb_marshal_dump_limited): do not free dump_arg, which
may be dereferenced in check_dump_arg due to continuation, and
get rid of dangling pointers.
* marshal.c (rb_marshal_load_with_proc): ditto for load_arg.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | marshal.c | 8 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 13 insertions, 5 deletions
@@ -1,3 +1,11 @@ +Wed Aug 9 21:16:22 2017 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * marshal.c (rb_marshal_dump_limited): do not free dump_arg, which + may be dereferenced in check_dump_arg due to continuation, and + get rid of dangling pointers. + + * marshal.c (rb_marshal_load_with_proc): ditto for load_arg. + Wed Aug 9 21:13:24 2017 NAKAMURA Usaku <usa@ruby-lang.org> * compile.c (iseq_compile_each): remove unused definition of unused @@ -1051,8 +1051,8 @@ rb_marshal_dump_limited(VALUE obj, VALUE port, int limit) rb_io_write(arg->dest, arg->str); rb_str_resize(arg->str, 0); } - free_dump_arg(arg); - rb_gc_force_recycle(wrapper); + clear_dump_arg(arg); + RB_GC_GUARD(wrapper); return port; } @@ -2090,8 +2090,8 @@ rb_marshal_load_with_proc(VALUE port, VALUE proc) if (!NIL_P(proc)) arg->proc = proc; v = r_object(arg); - free_load_arg(arg); - rb_gc_force_recycle(wrapper); + clear_load_arg(arg); + RB_GC_GUARD(wrapper); return v; } @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.3.5" #define RUBY_RELEASE_DATE "2017-08-09" -#define RUBY_PATCHLEVEL 360 +#define RUBY_PATCHLEVEL 361 #define RUBY_RELEASE_YEAR 2017 #define RUBY_RELEASE_MONTH 8 |