summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-17 08:41:57 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-17 08:41:57 (GMT)
commitdd998dd561c75054679f69b7e9d30af4bae7cfaa (patch)
tree45788a8865b567ce720366a01408fa74abbf89ef /marshal.c
parent8ae07cf34b3f8b428a46efa89b31bc3795b451d6 (diff)
marshal.c: do not recycle wrapper objects
* marshal.c (marshal_dump, marshal_load): do not recycle wrapper objects, to prevent from segfault with continuation. [ruby-dev:47970] [Bug #9523] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/marshal.c b/marshal.c
index b8106d7..7772b4c 100644
--- a/marshal.c
+++ b/marshal.c
@@ -993,8 +993,8 @@ marshal_dump(int argc, VALUE *argv)
rb_io_write(arg->dest, arg->str);
rb_str_resize(arg->str, 0);
}
- free_dump_arg(arg);
- rb_gc_force_recycle(wrapper); /* also guards from premature GC */
+ clear_dump_arg(arg);
+ RB_GC_GUARD(wrapper);
return port;
}
@@ -2004,8 +2004,8 @@ marshal_load(int argc, VALUE *argv)
if (!NIL_P(proc)) arg->proc = proc;
v = r_object(arg);
- free_load_arg(arg);
- rb_gc_force_recycle(wrapper); /* also guards from premature GC */
+ clear_load_arg(arg);
+ RB_GC_GUARD(wrapper);
return v;
}