From 71da3c50ef010d75391050e2919af7c9e0a6b262 Mon Sep 17 00:00:00 2001 From: k0kubun Date: Sun, 25 Feb 2018 02:12:25 +0000 Subject: 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 --- process.c | 1 + 1 file changed, 1 insertion(+) (limited to 'process.c') diff --git a/process.c b/process.c index cbdbe8f8f2..54687096e0 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; -- cgit v1.2.3