diff options
author | Koichi Sasada <ko1@atdot.net> | 2020-12-15 05:40:38 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2020-12-15 13:29:30 +0900 |
commit | aa6287cd26582e64c19e37dea3fd90b380b85d5b (patch) | |
tree | deb67efb225d92d0633f5fed5553aa2190a6ed8e /internal/vm.h | |
parent | 40b7358e934e3b1f2cc7a664f97e5cc1393cbc77 (diff) |
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`.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3903
Diffstat (limited to 'internal/vm.h')
-rw-r--r-- | internal/vm.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/vm.h b/internal/vm.h index d146bc6850..6a525b8159 100644 --- a/internal/vm.h +++ b/internal/vm.h @@ -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 */ |