Make special_sweep_p a per heap member #74625
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In
process_last_np_surv_region
, we set thespecial_sweep_p
flag when we don't have a region afternext_region = heap_segment_next (alloc_region)
is null together with some other conditions that is irrelevant here.Later, in
process_remaining_regions
, we assert thatheap_segment_next_rw (current_region) == 0
. I assume that it is checking the same thing, which is okay.But
special_sweep_p
is aPER_HEAP_ISOLATED
member, which means if one heap has that condition, it will set the flag for other heaps. On the other heaps, it is possible that the correspondingnext_region
is not null, thus triggering the assert.Changing the flag from
PER_HEAP_ISOLATED
to aPER_HEAP
member solved the issue.