From bd6ed47fb8836556db3a0f792b4c432cf5a65d4e Mon Sep 17 00:00:00 2001 From: Lee Culver Date: Tue, 28 Mar 2023 14:03:03 -0700 Subject: [PATCH] Restore original stack ref enumeration behavior (#84034) The previous change to ICorDebugGCReferenceEnum accidently inverted the logic for interior pointers. --- src/coreclr/debug/daccess/dacdbiimpl.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/coreclr/debug/daccess/dacdbiimpl.cpp b/src/coreclr/debug/daccess/dacdbiimpl.cpp index 7496ca039c7fbe..fb31abdc764359 100644 --- a/src/coreclr/debug/daccess/dacdbiimpl.cpp +++ b/src/coreclr/debug/daccess/dacdbiimpl.cpp @@ -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)); } }