aboutsummaryrefslogtreecommitdiffstats
path: root/vm_core.h
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 /vm_core.h
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 'vm_core.h')
-rw-r--r--vm_core.h2
1 files changed, 2 insertions, 0 deletions
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;