Skip to content

Doubly linked freelist fix - #44585

Merged
PeterSolMS merged 10 commits into
dotnet:masterfrom
PeterSolMS:doubly_linked_freelist_fix
Nov 13, 2020
Merged

PeterSolMS merged 10 commits into
dotnet:masterfrom
PeterSolMS:doubly_linked_freelist_fix

Conversation

@PeterSolMS

Copy link
Copy Markdown
Contributor

In gc_heap::allocate_uoh_object. we set the background mark bit if the new object is in a range that has the corresponding portions of the background mark_array committed.

However, if the object is in a segment that is allocated during background_sweep, we won't actually sweep the segment, and so the background mark bit stays on, causing confusion in the next background GC - the object itself will survive, but we won't keep the objects that it points at, so we'll have heap corruption.

Details:

In gc_heap::allocate_uoh_object. we set the background mark bit if the new object is in a range that has mark bits committed.

However, if the object is in a segment that is allocated during background_sweep, we won't actually sweep the segment, and so the background mark bits stays on, causing confusion in the next background GC - the object itself will survive, but we won't keep the objects that it points at, so we'll have heap corruption.
@ghost

ghost commented Nov 12, 2020

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/gc
See info in area-owners.md if you want to be subscribed.

Details


Issue meta data
Issue content:
In gc_heap::allocate_uoh_object. we set the background mark bit if the new object is in a range that has the corresponding portions of the background mark_array committed.

However, if the object is in a segment that is allocated during background_sweep, we won't actually sweep the segment, and so the background mark bit stays on, causing confusion in the next background GC - the object itself will survive, but we won't keep the objects that it points at, so we'll have heap corruption.

</td>
Issue author: PeterSolMS
Assignees: -
Labels:
`area-GC-coreclr`

</td>
Milestone: -

Comment thread src/coreclr/src/gc/gcpriv.h Resolved
@PeterSolMS
PeterSolMS merged commit 9f4650a into dotnet:master Nov 13, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants