aboutsummaryrefslogtreecommitdiffstats
path: root/template
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 /template
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 'template')
-rw-r--r--template/call_iseq_optimized.inc.tmpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/template/call_iseq_optimized.inc.tmpl b/template/call_iseq_optimized.inc.tmpl
index f8883a1d95..2d3ad40f7e 100644
--- a/template/call_iseq_optimized.inc.tmpl
+++ b/template/call_iseq_optimized.inc.tmpl
@@ -16,10 +16,10 @@
% P.each{|param|
% L.each{|local|
static VALUE
-<%= fname(param, local) %>(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
+<%= fname(param, local) %>(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling)
{
RB_DEBUG_COUNTER_INC(ccf_iseq_fix);
- return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, <%= param %>, <%= local %>);
+ return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(calling->cc), 0, <%= param %>, <%= local %>);
}
% }