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 should check against alloc_allocated instead of heap_segment_allocated for ephemeral segment #2450

Merged
merged 2 commits into from
Jul 29, 2021
Merged
Changes from all 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
11 changes: 8 additions & 3 deletions src/SOS/Strike/eeheap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,12 @@ BOOL GCObjInSegment(TADDR taddrObj, const GCHeapDetails &heap,
ExtOut("Error requesting heap segment %p\n", SOS_PTR(taddrSeg));
return FALSE;
}
if (taddrObj >= TO_TADDR(dacpSeg.mem) && taddrObj && taddrObj < TO_TADDR(dacpSeg.allocated))
TADDR allocated = TO_TADDR(dacpSeg.allocated);
if (taddrSeg == TO_TADDR(heap.ephemeral_heap_segment))
{
allocated = TO_TADDR(heap.alloc_allocated);
}
if (taddrObj >= TO_TADDR(dacpSeg.mem) && taddrObj < allocated)
{
rngSeg.segAddr = (TADDR)dacpSeg.segmentAddr;
rngSeg.start = (TADDR)dacpSeg.mem;
Expand Down Expand Up @@ -776,7 +781,7 @@ BOOL GCObjInLargeSegment(TADDR taddrObj, const GCHeapDetails &heap, TADDR_SEGINF
ExtOut("Error requesting heap segment %p\n", SOS_PTR(taddrSeg));
return FALSE;
}
if (taddrObj >= TO_TADDR(dacpSeg.mem) && taddrObj && taddrObj < TO_TADDR(dacpSeg.allocated))
if (taddrObj >= TO_TADDR(dacpSeg.mem) && taddrObj < TO_TADDR(dacpSeg.allocated))
{
rngSeg.segAddr = (TADDR)dacpSeg.segmentAddr;
rngSeg.start = (TADDR)dacpSeg.mem;
Expand Down Expand Up @@ -809,7 +814,7 @@ BOOL GCObjInPinnedObjectSegment(TADDR taddrObj, const GCHeapDetails &heap, TADDR
ExtOut("Error requesting heap segment %p\n", SOS_PTR(taddrSeg));
return FALSE;
}
if (taddrObj >= TO_TADDR(dacpSeg.mem) && taddrObj && taddrObj < TO_TADDR(dacpSeg.allocated))
if (taddrObj >= TO_TADDR(dacpSeg.mem) && taddrObj < TO_TADDR(dacpSeg.allocated))
{
rngSeg.segAddr = (TADDR)dacpSeg.segmentAddr;
rngSeg.start = (TADDR)dacpSeg.mem;
Expand Down