From 7ec1fc37f4c87c691555e76d51b6590761b3ec64 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Tue, 16 Nov 2021 18:14:50 +0900 Subject: add `VM_CALLCACHE_ON_STACK` check if iseq refers to on stack CC (it shouldn't). --- vm_callinfo.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vm_callinfo.h') diff --git a/vm_callinfo.h b/vm_callinfo.h index 91ed55bf5f..b3aafd6de1 100644 --- a/vm_callinfo.h +++ b/vm_callinfo.h @@ -290,6 +290,7 @@ struct rb_callcache { }; #define VM_CALLCACHE_UNMARKABLE IMEMO_FL_USER0 +#define VM_CALLCACHE_ON_STACK IMEMO_FL_USER1 static inline const struct rb_callcache * vm_cc_new(VALUE klass, @@ -305,7 +306,8 @@ vm_cc_new(VALUE klass, (struct rb_callcache) { \ .flags = T_IMEMO | \ (imemo_callcache << FL_USHIFT) | \ - VM_CALLCACHE_UNMARKABLE, \ + VM_CALLCACHE_UNMARKABLE | \ + VM_CALLCACHE_ON_STACK, \ .klass = clazz, \ .cme_ = cme, \ .call_ = call, \ -- cgit v1.2.3