Skip to content

Commit ce12caa

Browse files
markshannonebonnal
authored andcommitted
pythonGH-124567: Replace quadratic assert with linear one (pythonGH-127009)
1 parent 76cd647 commit ce12caa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1394,7 +1394,6 @@ visit_add_to_container(PyObject *op, void *arg)
13941394
static uintptr_t
13951395
expand_region_transitively_reachable(PyGC_Head *container, PyGC_Head *gc, GCState *gcstate)
13961396
{
1397-
validate_list(container, collecting_clear_unreachable_clear);
13981397
struct container_and_flag arg = {
13991398
.container = container,
14001399
.visited_space = gcstate->visited_space,
@@ -1468,6 +1467,7 @@ gc_collect_increment(PyThreadState *tstate, struct gc_collection_stats *stats)
14681467
gc_set_old_space(gc, gcstate->visited_space);
14691468
increment_size += expand_region_transitively_reachable(&increment, gc, gcstate);
14701469
}
1470+
validate_list(&increment, collecting_clear_unreachable_clear);
14711471
gc_list_validate_space(&increment, gcstate->visited_space);
14721472
PyGC_Head survivors;
14731473
gc_list_init(&survivors);

0 commit comments

Comments
 (0)