Skip to content

Commit

Permalink
Restore original stack ref enumeration behavior (#84034)
Browse files Browse the repository at this point in the history
The previous change to ICorDebugGCReferenceEnum accidently inverted the logic for interior pointers.
  • Loading branch information
leculver authored Mar 28, 2023
1 parent 669e5a9 commit bd6ed47
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/coreclr/debug/daccess/dacdbiimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7768,17 +7768,16 @@ HRESULT DacStackReferenceWalker::Next(ULONG count, DacGcReference stackRefs[], U
{
stackRefs[i].dwType = CorReferenceStack;
stackRefs[i].vmDomain.SetDacTargetPtr(domain);
stackRefs[i].i64ExtraData = 0;

const SOSStackRefData &sosStackRef = mList.Get(i);
if (sosStackRef.Flags & GC_CALL_INTERIOR)
{
stackRefs[i].i64ExtraData = GC_CALL_INTERIOR;
stackRefs[i].objHnd.SetDacTargetPtr(CLRDATA_ADDRESS_TO_TADDR(sosStackRef.Address));
stackRefs[i].pObject = CLRDATA_ADDRESS_TO_TADDR(sosStackRef.Object) | 1;
}
else
{
stackRefs[i].i64ExtraData = 0;
stackRefs[i].pObject = CLRDATA_ADDRESS_TO_TADDR(sosStackRef.Object) | 1;
stackRefs[i].objHnd.SetDacTargetPtr(CLRDATA_ADDRESS_TO_TADDR(sosStackRef.Address));
}
}

Expand Down

0 comments on commit bd6ed47

Please sign in to comment.