Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Code review feedback
  • Loading branch information
hoyosjs committed Sep 8, 2021
commit f8a1714a218648e70c4f0e6a6c3327d91e6bdd9c
4 changes: 2 additions & 2 deletions src/coreclr/debug/daccess/dacdbiimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,14 @@ template<class T> void DeleteDbiMemory(T *p)
// There's an inherent risk here - where each element's destructor will get called within
// the context of the DAC. If the destructor tries to use the CRT allocator logic expecting
// to hit the DBI's, we could be in trouble. Those objects need to use an export allocator like this.
template<class T> void DeleteDbiArrayMemory(T *p, int len)
template<class T> void DeleteDbiArrayMemory(T *p, int count)
{
if (p == NULL)
{
return;
}

for (T *cur = p; cur < p + len; cur++)
for (T *cur = p; cur < p + count; cur++)
{
cur->~T();
}
Expand Down
4 changes: 4 additions & 0 deletions src/coreclr/debug/di/rspriv.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ struct MachineInfo
USHORT m_usPort;
};

#ifdef DACCESS_COMPILE
#error This header cannot be used in the DAC
#endif

extern forDbiWorker forDbi;

// for dbi we just default to new, but we need to have these defined for both dac and dbi
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/debug/inc/dacdbiinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// In the DBI implementation, this can directly call delete (assuming the IAllocator::Free
// directly called new).
template<class T> void DeleteDbiMemory(T *p);
template<class T> void DeleteDbiArrayMemory(T *p, int len);
template<class T> void DeleteDbiArrayMemory(T *p, int count);
// Need a class to serve as a tag that we can use to overload New/Delete.
class forDbiWorker {};
extern forDbiWorker forDbi;
Expand Down