summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2024-02-27 14:50:40 -0500
committerPeter Zhu <peter@peterzhu.ca>2024-03-01 10:39:51 -0500
commit162e13c884a1764e6cf6e62407e607d18f29eecc (patch)
tree9f2d43ab8bd43b432a0e61f8406808d39df44a15
parentf3af5ae7e6c1c096bbfe46d69de825a02b1696cf (diff)
Remove pointer check in vm_ccs_free
We don't need to check that the object is pointer to the GC heap in vm_ccs_free because it is called during sweeping, which does not free pages so it can never point to an object that is not on the GC heap.
-rw-r--r--imemo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/imemo.c b/imemo.c
index 66428f39b4..0031b3322c 100644
--- a/imemo.c
+++ b/imemo.c
@@ -455,7 +455,7 @@ vm_ccs_free(struct rb_class_cc_entries *ccs, int alive, VALUE klass)
if (!alive) {
void *ptr = asan_unpoison_object_temporary((VALUE)cc);
// ccs can be free'ed.
- if (rb_gc_is_ptr_to_obj(cc) &&
+ if (rb_objspace_markable_object_p((VALUE)cc) &&
IMEMO_TYPE_P(cc, imemo_callcache) &&
cc->klass == klass) {
// OK. maybe target cc.