summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-25 02:12:25 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-25 02:12:25 +0000
commit71da3c50ef010d75391050e2919af7c9e0a6b262 (patch)
tree83217067fba05e5f739f728407d4ad722105e227
parent591baf8fe3d13a38d39ee3f0f027839651f5d47b (diff)
process.c: guard eargp against GC
`rb_str_append` may trigger GC, and in that case eargp might be GCed. Probably for protecting it, `RB_GC_GUARD(execarg_obj)` can be seen in other places. Hoping to fix: http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/569818 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--process.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/process.c b/process.c
index cbdbe8f..5468709 100644
--- a/process.c
+++ b/process.c
@@ -4111,6 +4111,7 @@ rb_f_system(int argc, VALUE *argv)
rb_str_cat_cstr(pst_message_status(str, status), ": ");
rb_str_append(str, eargp->invoke.sh.shell_script);
rb_exc_raise(rb_exc_new_str(rb_eRuntimeError, str));
+ RB_GC_GUARD(execarg_obj);
}
else {
return Qfalse;