Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
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
7 changes: 0 additions & 7 deletions src/debug/daccess/dacdbiimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1238,12 +1238,6 @@ bool DacDbiInterfaceImpl::GetMetaDataFileInfoFromPEFile(VMPTR_PEFile vmPEFile,
bool &isNGEN,
IStringHolder* pStrFilename)
{
#if !defined(FEATURE_PREJIT)

return false;

#else // defined(FEATURE_PREJIT)

DD_ENTER_MAY_THROW;

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

pStrFilename->AssignCopy(wszFilePath);
return ret;
#endif // !defined(FEATURE_PREJIT)
}


Expand Down
4 changes: 3 additions & 1 deletion src/debug/daccess/request_svr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ ClrDataAccess::EnumSvrGlobalMemoryRegions(CLRDataEnumMemoryFlags flags)
size_t gen_table_size = g_gcDacGlobals->generation_size * (*g_gcDacGlobals->max_gen + 2);
DacEnumMemoryRegion(dac_cast<TADDR>(pHeap), sizeof(dac_gc_heap));
DacEnumMemoryRegion(dac_cast<TADDR>(pHeap->finalize_queue), sizeof(dac_finalize_queue));
DacEnumMemoryRegion(dac_cast<TADDR>(pHeap->generation_table), gen_table_size);

TADDR taddrTable = dac_cast<TADDR>(pHeap) + offsetof(dac_gc_heap, generation_table);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is different about the new line vs. the old one? If they compute different values does that mean the same issue exists in the DacEnumMemoryRegion(pHeap->finalize_queue) call that preceeds this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original code was throwing an invalid memory exception because generation_table is an array and the dac_cast macro didn't seem to handle it correctly.

DacEnumMemoryRegion(taddrTable, gen_table_size);

// enumerating the generations from max (which is normally gen2) to max+1 gives you
// the segment list for all the normal segements plus the large heap segment (max+1)
Expand Down
4 changes: 2 additions & 2 deletions src/vm/typedesc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ void TypeDesc::GetName(SString &ssBuf)
th = TypeHandle(this);

if (kind == ELEMENT_TYPE_ARRAY)
rank = ((ArrayTypeDesc*) this)->GetRank();
rank = dac_cast<PTR_ArrayTypeDesc>(this)->GetRank();
else if (CorTypeInfo::IsGenericVariable(kind))
rank = ((TypeVarTypeDesc*) this)->GetIndex();
rank = dac_cast<PTR_TypeVarTypeDesc>(this)->GetIndex();
else
rank = 0;

Expand Down