diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-15 08:38:01 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-15 08:38:01 +0000 |
commit | d9ae8c0bc8b3798ae9e9d611a1136fc4455ff742 (patch) | |
tree | c8b0f66af68c1e3396d8e622fe61aa9c50a2b0f6 /marshal.c | |
parent | cd891481993ce279fbbacb848d19540e3bca67d3 (diff) | |
download | bundler-d9ae8c0bc8b3798ae9e9d611a1136fc4455ff742.tar.gz |
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/trunk@57634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r-- | marshal.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1053,8 +1053,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; } @@ -2084,8 +2084,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; } |