From 12239de462ce499ab79ed21066f0794c00fa0266 Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Tue, 19 Nov 2024 11:50:10 +0000 Subject: [PATCH 1/3] Replace quadratic assert with linear one --- Python/gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/gc.c b/Python/gc.c index fe81ca5989c621..a774183c49d121 100644 --- a/Python/gc.c +++ b/Python/gc.c @@ -1394,7 +1394,6 @@ visit_add_to_container(PyObject *op, void *arg) static uintptr_t expand_region_transitively_reachable(PyGC_Head *container, PyGC_Head *gc, GCState *gcstate) { - validate_list(container, collecting_clear_unreachable_clear); struct container_and_flag arg = { .container = container, .visited_space = gcstate->visited_space, @@ -1468,6 +1467,7 @@ gc_collect_increment(PyThreadState *tstate, struct gc_collection_stats *stats) gc_set_old_space(gc, gcstate->visited_space); increment_size += expand_region_transitively_reachable(&increment, gc, gcstate); } + validate_list(&increment, collecting_clear_unreachable_clear); gc_list_validate_space(&increment, gcstate->visited_space); PyGC_Head survivors; gc_list_init(&survivors); From 39f50107989af51798c79d438461523793c745af Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Tue, 19 Nov 2024 12:02:10 +0000 Subject: [PATCH 2/3] Spurious change to force doctests to run in CI --- Doc/library/gc.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/library/gc.rst b/Doc/library/gc.rst index 1065ec30802841..c361e01c4e6d75 100644 --- a/Doc/library/gc.rst +++ b/Doc/library/gc.rst @@ -358,3 +358,6 @@ The following constants are provided for use with :func:`set_debug`: The debugging flags necessary for the collector to print information about a leaking program (equal to ``DEBUG_COLLECTABLE | DEBUG_UNCOLLECTABLE | DEBUG_SAVEALL``). + + +Spurious change to force doctests to run in CI. From 539ebbc3d872b7f7f1b07cda6e9d18e8515ec9c4 Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Tue, 19 Nov 2024 12:03:07 +0000 Subject: [PATCH 3/3] Remove spurious change --- Doc/library/gc.rst | 3 --- 1 file changed, 3 deletions(-) diff --git a/Doc/library/gc.rst b/Doc/library/gc.rst index c361e01c4e6d75..1065ec30802841 100644 --- a/Doc/library/gc.rst +++ b/Doc/library/gc.rst @@ -358,6 +358,3 @@ The following constants are provided for use with :func:`set_debug`: The debugging flags necessary for the collector to print information about a leaking program (equal to ``DEBUG_COLLECTABLE | DEBUG_UNCOLLECTABLE | DEBUG_SAVEALL``). - - -Spurious change to force doctests to run in CI.