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
This commit is contained in:
parent
591baf8fe3
commit
71da3c50ef
@ -4111,6 +4111,7 @@ rb_f_system(int argc, VALUE *argv)
|
|||||||
rb_str_cat_cstr(pst_message_status(str, status), ": ");
|
rb_str_cat_cstr(pst_message_status(str, status), ": ");
|
||||||
rb_str_append(str, eargp->invoke.sh.shell_script);
|
rb_str_append(str, eargp->invoke.sh.shell_script);
|
||||||
rb_exc_raise(rb_exc_new_str(rb_eRuntimeError, str));
|
rb_exc_raise(rb_exc_new_str(rb_eRuntimeError, str));
|
||||||
|
RB_GC_GUARD(execarg_obj);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return Qfalse;
|
return Qfalse;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user