1
0
Fork 0
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:
Koichi Sasada 2020-12-15 05:40:38 +09:00
parent 40b7358e93
commit aa6287cd26
Notes: git 2020-12-15 13:29:53 +09:00
8 changed files with 261 additions and 282 deletions

View file

@ -27,8 +27,7 @@ struct rb_callable_method_entry_struct; /* in method.h */
struct rb_method_definition_struct; /* in method.h */
struct rb_execution_context_struct; /* in vm_core.h */
struct rb_control_frame_struct; /* in vm_core.h */
struct rb_calling_info; /* in vm_core.h */
struct rb_call_data;
struct rb_callinfo; /* in vm_core.h */
enum method_missing_reason {
MISSING_NOENTRY = 0x00,
@ -93,7 +92,7 @@ VALUE rb_eql_opt(VALUE obj1, VALUE obj2);
struct rb_iseq_struct;
MJIT_SYMBOL_EXPORT_BEGIN
void rb_vm_search_method_slowpath(VALUE cd_owner, struct rb_call_data *cd, VALUE klass);
const struct rb_callcache *rb_vm_search_method_slowpath(const struct rb_callinfo *ci, VALUE klass);
MJIT_SYMBOL_EXPORT_END
/* vm_method.c */