summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-01 02:57:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-01 02:57:43 +0000
commit32289fbed439e00ce8624834ced7a6bc3a12d70b (patch)
treeb59387af439ff922d7d6c396ff13efcc839608a9 /insns.def
parent563127d710583f412168eac4f067e33f4ae628d5 (diff)
vm_args.c: GC guard
* vm_args.c (vm_caller_setup_arg_block): prevent newly created ifunc object from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def8
1 files changed, 5 insertions, 3 deletions
diff --git a/insns.def b/insns.def
index a923d3a4d6..ad6c4bc747 100644
--- a/insns.def
+++ b/insns.def
@@ -941,10 +941,10 @@ send
(VALUE val) // inc += - (int)(ci->orig_argc + ((ci->flag & VM_CALL_ARGS_BLOCKARG) ? 1 : 0));
{
struct rb_calling_info calling;
-
- vm_caller_setup_arg_block(th, reg_cfp, &calling, ci, blockiseq, FALSE);
+ VALUE mark = vm_caller_setup_arg_block(th, reg_cfp, &calling, ci, blockiseq, FALSE);
vm_search_method(ci, cc, calling.recv = TOPN(calling.argc = ci->orig_argc));
CALL_METHOD(&calling, ci, cc);
+ RB_GC_GUARD(mark);
}
DEFINE_INSN
@@ -989,13 +989,15 @@ invokesuper
(...)
(VALUE val) // inc += - (int)(ci->orig_argc + ((ci->flag & VM_CALL_ARGS_BLOCKARG) ? 1 : 0));
{
+ VALUE mark;
struct rb_calling_info calling;
calling.argc = ci->orig_argc;
- vm_caller_setup_arg_block(th, reg_cfp, &calling, ci, blockiseq, TRUE);
+ mark = vm_caller_setup_arg_block(th, reg_cfp, &calling, ci, blockiseq, TRUE);
calling.recv = GET_SELF();
vm_search_super_method(th, GET_CFP(), &calling, ci, cc);
CALL_METHOD(&calling, ci, cc);
+ RB_GC_GUARD(mark);
}
/**