Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 934ef61

Browse files
author
Mike McLaughlin
authored
Fix minidumps not loading in VS issue (#27553)
Fix a function that was ifdef'ed needed for the metadata locator callbacks to work. Fix some not properly DAC'ized code in the type desc and server GC code. Caused an exception during dump generation. Issue: https://github.com/dotnet/coreclr/issues/26907
1 parent 9358413 commit 934ef61

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

src/debug/daccess/dacdbiimpl.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,12 +1238,6 @@ bool DacDbiInterfaceImpl::GetMetaDataFileInfoFromPEFile(VMPTR_PEFile vmPEFile,
12381238
bool &isNGEN,
12391239
IStringHolder* pStrFilename)
12401240
{
1241-
#if !defined(FEATURE_PREJIT)
1242-
1243-
return false;
1244-
1245-
#else // defined(FEATURE_PREJIT)
1246-
12471241
DD_ENTER_MAY_THROW;
12481242

12491243
DWORD dwDataSize;
@@ -1266,7 +1260,6 @@ bool DacDbiInterfaceImpl::GetMetaDataFileInfoFromPEFile(VMPTR_PEFile vmPEFile,
12661260

12671261
pStrFilename->AssignCopy(wszFilePath);
12681262
return ret;
1269-
#endif // !defined(FEATURE_PREJIT)
12701263
}
12711264

12721265

src/debug/daccess/request_svr.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,9 @@ ClrDataAccess::EnumSvrGlobalMemoryRegions(CLRDataEnumMemoryFlags flags)
227227
size_t gen_table_size = g_gcDacGlobals->generation_size * (*g_gcDacGlobals->max_gen + 2);
228228
DacEnumMemoryRegion(dac_cast<TADDR>(pHeap), sizeof(dac_gc_heap));
229229
DacEnumMemoryRegion(dac_cast<TADDR>(pHeap->finalize_queue), sizeof(dac_finalize_queue));
230-
DacEnumMemoryRegion(dac_cast<TADDR>(pHeap->generation_table), gen_table_size);
230+
231+
TADDR taddrTable = dac_cast<TADDR>(pHeap) + offsetof(dac_gc_heap, generation_table);
232+
DacEnumMemoryRegion(taddrTable, gen_table_size);
231233

232234
// enumerating the generations from max (which is normally gen2) to max+1 gives you
233235
// the segment list for all the normal segements plus the large heap segment (max+1)

src/vm/typedesc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@ void TypeDesc::GetName(SString &ssBuf)
229229
th = TypeHandle(this);
230230

231231
if (kind == ELEMENT_TYPE_ARRAY)
232-
rank = ((ArrayTypeDesc*) this)->GetRank();
232+
rank = dac_cast<PTR_ArrayTypeDesc>(this)->GetRank();
233233
else if (CorTypeInfo::IsGenericVariable(kind))
234-
rank = ((TypeVarTypeDesc*) this)->GetIndex();
234+
rank = dac_cast<PTR_TypeVarTypeDesc>(this)->GetIndex();
235235
else
236236
rank = 0;
237237

0 commit comments

Comments
 (0)