Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address review comments
  • Loading branch information
markshannon committed Mar 22, 2024
commit ed856245b2f74b91a105880aa4dc236c972b80d5
2 changes: 1 addition & 1 deletion Lib/test/test_gc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ def make_ll(depth):
head = make_ll(1000)
count = 1000

# There will some objects we aren't counting,
# There will be some objects we aren't counting,
# e.g. the gc stats dicts. This test checks
# that the counts don't grow, so we try to
# correct for the uncounted objects
Expand Down
5 changes: 4 additions & 1 deletion Python/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,10 @@ expand_region_transitively_reachable(PyGC_Head *container, PyGC_Head *gc, GCStat
static void
completed_cycle(GCState *gcstate)
{
assert(gc_list_is_empty(&gcstate->old[gcstate->visited_space^1].head));
#ifdef Py_DEBUG
PyGC_Head *not_visited = &gcstate->old[gcstate->visited_space^1].head;
assert(gc_list_is_empty(not_visited));
#endif
gcstate->visited_space = flip_old_space(gcstate->visited_space);
gcstate->work_to_do = 0;
}
Expand Down