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

Filter out addresses that are not in bookkeeping range during background promote #77067

Merged
merged 4 commits into from
Oct 21, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25188,6 +25188,13 @@ void gc_heap::background_promote (Object** ppObject, ScanContext* sc, uint32_t f
if (o == 0)
return;

#if defined(FEATURE_CONSERVATIVE_GC) && defined(USE_REGIONS)
cshung marked this conversation as resolved.
Show resolved Hide resolved
if (!(is_in_bookkeeping_range (o)))
cshung marked this conversation as resolved.
Show resolved Hide resolved
{
return;
}
#endif

#ifdef DEBUG_DestroyedHandleValue
// we can race with destroy handle during concurrent scan
if (o == (uint8_t*)DEBUG_DestroyedHandleValue)
Expand Down Expand Up @@ -35952,6 +35959,13 @@ void gc_heap::background_promote_callback (Object** ppObject, ScanContext* sc,
if (o == 0)
return;

#if defined(FEATURE_CONSERVATIVE_GC) && defined(USE_REGIONS)
if (!(is_in_bookkeeping_range (o)))
cshung marked this conversation as resolved.
Show resolved Hide resolved
{
return;
}
#endif

HEAP_FROM_THREAD;

gc_heap* hp = gc_heap::heap_of (o);
Expand Down