Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

we need to skip the SIP region in the last step of handling the alloc region #94249

Merged
merged 1 commit into from Nov 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/coreclr/gc/gc.cpp
Expand Up @@ -31645,6 +31645,12 @@ void gc_heap::process_remaining_regions (int current_plan_gen_num, generation* c
dprintf (REGIONS_LOG, ("after going through the rest of regions - regions in g2: %d, g1: %d, g0: %d, to be empty %d now",
planned_regions_per_gen[2], planned_regions_per_gen[1], planned_regions_per_gen[0], to_be_empty_regions));

// We may not have gone through the while loop above so we could get an alloc region that's SIP (which normally would be
// filtered out by get_next_alloc_seg in allocate_in_condemned_generations. But we are not allocating in condemned anymore
// so make sure we skip if it's SIP.
current_region = heap_segment_non_sip (current_region);
dprintf (REGIONS_LOG, ("now current region is %p", (current_region ? heap_segment_mem (current_region) : 0)));

if (current_region)
{
decide_on_demotion_pin_surv (current_region, &to_be_empty_regions);
Expand Down