Fix assert failure in grow_heap_segment in no GC region. (#86644)
authorPeter Sollich <petersol@microsoft.com>
Tue, 23 May 2023 16:37:03 +0000 (18:37 +0200)
committerGitHub <noreply@github.com>
Tue, 23 May 2023 16:37:03 +0000 (18:37 +0200)
This addresses issue #86612.

We won't actually decommit anything once we enter a no GC region, so the assert was overeager for this case, but it seems better to keep the assert and turn off the gradual_decommit_in_progress_p flag when we enter a no GC region.

src/coreclr/gc/gc.cpp

index e91ae9d..5929320 100644 (file)
@@ -6995,6 +6995,7 @@ void gc_heap::gc_thread_function ()
             {
                 update_collection_counts_for_no_gc();
                 proceed_with_gc_p = FALSE;
+                gradual_decommit_in_progress_p = FALSE;
             }
             else
             {