mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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`.
This commit is contained in:
parent
40b7358e93
commit
aa6287cd26
Notes:
git
2020-12-15 13:29:53 +09:00
8 changed files with 261 additions and 282 deletions
|
|
@ -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 %>);
|
||||
}
|
||||
|
||||
% }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue