aboutsummaryrefslogtreecommitdiffstats
path: root/insns.def
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-12-15 05:40:38 +0900
committerKoichi Sasada <ko1@atdot.net>2020-12-15 13:29:30 +0900
commitaa6287cd26582e64c19e37dea3fd90b380b85d5b (patch)
treedeb67efb225d92d0633f5fed5553aa2190a6ed8e /insns.def
parent40b7358e934e3b1f2cc7a664f97e5cc1393cbc77 (diff)
downloadruby-aa6287cd26582e64c19e37dea3fd90b380b85d5b.tar.gz
fix inline method cache sync bug
`cd` is passed to method call functions to method invocation functions, but `cd` can be manipulated by other ractors simultaneously so it contains thread-safety issue. To solve this issue, this patch stores `ci` and found `cc` to `calling` and stops to pass `cd`.
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def5
1 files changed, 0 insertions, 5 deletions
diff --git a/insns.def b/insns.def
index f912b51c87..09bb9e1b5b 100644
--- a/insns.def
+++ b/insns.def
@@ -891,11 +891,6 @@ invokeblock
// attr rb_snum_t sp_inc = sp_inc_of_invokeblock(cd->ci);
// attr rb_snum_t comptime_sp_inc = sp_inc_of_invokeblock(ci);
{
- if (UNLIKELY(vm_cc_call(cd->cc) != vm_invokeblock_i)) {
- const struct rb_callcache *cc = vm_cc_new(0, NULL, vm_invokeblock_i);
- RB_OBJ_WRITE(GET_ISEQ(), &cd->cc, cc);
- }
-
VALUE bh = VM_BLOCK_HANDLER_NONE;
val = vm_sendish(ec, GET_CFP(), cd, bh, vm_search_invokeblock);