From 9aeea739dd31595f150881f6a525cbda3a2ee44d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 28 Apr 2021 06:54:43 -0700 Subject: seq-iter: gc issue. * lib.c (seq_iter_mark): The default case checks the type of the wrong object. The seq_iter object is necessarily a cobjp, and necessarily not a obj_struct_p so the test is always false, and we do not call gc_mark(si->ui.iter). The check must be applied to the object being iterated. --- lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.c b/lib.c index 2f0f9859..82869026 100644 --- a/lib.c +++ b/lib.c @@ -903,7 +903,7 @@ static void seq_iter_mark(val seq_iter) gc_mark(si->ui.iter); break; default: - if (cobjp(seq_iter) && obj_struct_p(seq_iter)) + if (cobjp(si->inf.obj) && obj_struct_p(si->inf.obj)) gc_mark(si->ui.iter); break; } -- cgit v1.2.3