diff options
author | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-25 02:12:25 +0000 |
---|---|---|
committer | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-25 02:12:25 +0000 |
commit | 71da3c50ef010d75391050e2919af7c9e0a6b262 (patch) | |
tree | 83217067fba05e5f739f728407d4ad722105e227 /process.c | |
parent | 591baf8fe3d13a38d39ee3f0f027839651f5d47b (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
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |