Skip to content

Commit 1757497

Browse files
github-actions[bot]leculverhoyosjs
authored
[release/8.0] Properly handle debugger-enumerating interior pointers and enregistered refs (#92360)
* Fix issue with enregistered values * Fix assert and enregistered ref reporting * Fix issue from merge --------- Co-authored-by: Lee Culver <[email protected]> Co-authored-by: Juan Sebastian Hoyos Ayala <[email protected]> Co-authored-by: Juan Hoyos <[email protected]>
1 parent 8ae598e commit 1757497

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/coreclr/debug/daccess/dacdbiimpl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7788,8 +7788,9 @@ HRESULT DacStackReferenceWalker::Next(ULONG count, DacGcReference stackRefs[], U
77887788
stackRefs[i].i64ExtraData = 0;
77897789

77907790
const SOSStackRefData &sosStackRef = mList.Get(i);
7791-
if (sosStackRef.Flags & GC_CALL_INTERIOR)
7791+
if (sosStackRef.Flags & GC_CALL_INTERIOR || sosStackRef.Address == 0)
77927792
{
7793+
// Direct pointer case - interior pointer, Frame ref, or enregistered var.
77937794
stackRefs[i].pObject = CLRDATA_ADDRESS_TO_TADDR(sosStackRef.Object) | 1;
77947795
}
77957796
else

src/coreclr/debug/di/rsclass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ HRESULT CordbClass::GetStaticFieldValue(mdFieldDef fieldDef,
132132
IMetaDataImport * pImport = NULL;
133133
EX_TRY
134134
{
135+
RSLockHolder lockHolder(GetProcess()->GetProcessLock());
135136
pImport = GetModule()->GetMetaDataImporter(); // throws
136137

137138
// Validate the token.
@@ -1191,4 +1192,3 @@ HRESULT CordbClass::SearchFieldInfo(
11911192
// Well, the field doesn't even belong to this class...
11921193
ThrowHR(E_INVALIDARG);
11931194
}
1194-

0 commit comments

Comments
 (0)