summaryrefslogtreecommitdiff
path: root/shape.c
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2025-06-03 22:11:10 +0200
committerJean Boussier <[email protected]>2025-06-04 07:59:20 +0200
commit6b8dcb7c8f13f13b31d610f38ff677d4e5ed8e56 (patch)
treef53e2a7135dcc2c09ec06a121baa204055cb42ba /shape.c
parentbbd5a5a81d8bf3c7368d308c10f5752be25af6d1 (diff)
shape.c: fix off by one error in `shape_tree_mark`
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13289
Diffstat (limited to 'shape.c')
-rw-r--r--shape.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shape.c b/shape.c
index 027cbaf8b9..75dfc49fc0 100644
--- a/shape.c
+++ b/shape.c
@@ -303,7 +303,7 @@ static void
shape_tree_mark(void *data)
{
rb_shape_t *cursor = rb_shape_get_root_shape();
- rb_shape_t *end = RSHAPE(GET_SHAPE_TREE()->next_shape_id);
+ rb_shape_t *end = RSHAPE(GET_SHAPE_TREE()->next_shape_id - 1);
while (cursor < end) {
if (cursor->edges && !SINGLE_CHILD_P(cursor->edges)) {
// FIXME: GC compaction may call `rb_shape_traverse_from_new_root`