Skip to content

Commit 236ce6a

Browse files
authored
Fix assert failure in grow_heap_segment for SVR GC. (#86889)
For my previous change, I overlooked the fact that we may call grow_heap_segment from within should_proceed_for_no_gc(), so it's too late to turn off gradual_decommit_in_progress_p after this method returns.
1 parent cfa28e3 commit 236ce6a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/coreclr/gc/gc.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6995,7 +6995,6 @@ void gc_heap::gc_thread_function ()
69956995
{
69966996
update_collection_counts_for_no_gc();
69976997
proceed_with_gc_p = FALSE;
6998-
gradual_decommit_in_progress_p = FALSE;
69996998
}
70006999
else
70017000
{
@@ -22935,6 +22934,11 @@ BOOL gc_heap::should_proceed_for_no_gc()
2293522934
BOOL no_gc_requested = FALSE;
2293622935
BOOL get_new_loh_segments = FALSE;
2293722936

22937+
#ifdef MULTIPLE_HEAPS
22938+
// need to turn off this flag here because of the call to grow_heap_segment below
22939+
gradual_decommit_in_progress_p = FALSE;
22940+
#endif //MULTIPLE_HEAPS
22941+
2293822942
gc_heap* hp = nullptr;
2293922943
if (current_no_gc_region_info.soh_allocation_size)
2294022944
{

0 commit comments

Comments
 (0)