From 4207e3168a2e1c7f5c4d5a828f7ee8819ff9e85e Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Fri, 26 Jun 2026 02:00:36 +0200 Subject: [PATCH] Remove concurrent verify_soh_segment_list call in background_sweep The removed call site runs inside the concurrent background sweep loop, after restart_EE(), when allocations and SOH segment-list mutations can run on other threads. verify_soh_segment_list assumes stable list topology while it walks generation links, so calling it in this window can observe in-flight updates and report false verification failures. We keep verification at synchronized GC phase boundaries and remove only this racy in-loop invocation. --- src/coreclr/gc/background.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/coreclr/gc/background.cpp b/src/coreclr/gc/background.cpp index 831d6a3516aacc..2fd85040cc6835 100644 --- a/src/coreclr/gc/background.cpp +++ b/src/coreclr/gc/background.cpp @@ -4114,8 +4114,6 @@ void gc_heap::background_sweep() current_sweep_pos = end; } - verify_soh_segment_list(); - #ifdef DOUBLY_LINKED_FL while (next_seg && heap_segment_background_allocated (next_seg) == 0) {