aboutsummaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index af9879a47f..57771db383 100644
--- a/gc.c
+++ b/gc.c
@@ -2207,8 +2207,10 @@ is_pointer_to_heap(rb_objspace_t *objspace, void *ptr)
page = heap_pages_sorted[mid];
if (page->start <= p) {
if (p < page->start + page->total_slots) {
- RB_DEBUG_COUNTER_INC(gc_isptr_maybe);
- return TRUE;
+ if (!page->flags.in_tomb) {
+ RB_DEBUG_COUNTER_INC(gc_isptr_maybe);
+ return TRUE;
+ }
}
lo = mid + 1;
}