From aa6287cd26582e64c19e37dea3fd90b380b85d5b Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Tue, 15 Dec 2020 05:40:38 +0900 Subject: 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`. --- vm_core.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vm_core.h') diff --git a/vm_core.h b/vm_core.h index 117671bcf1..8540f8d1de 100644 --- a/vm_core.h +++ b/vm_core.h @@ -238,6 +238,8 @@ union iseq_inline_storage_entry { }; struct rb_calling_info { + const struct rb_callinfo *ci; + const struct rb_callcache *cc; VALUE block_handler; VALUE recv; int argc; -- cgit v1.2.3