Skip to content

Commit 66244e0

Browse files
authored
Fix ASSERT in GC heap compact (#3059)
***NO_CI***
1 parent 46e9a8d commit 66244e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CLR/Core/GarbageCollector_Compaction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,13 @@ void CLR_RT_GarbageCollector::Heap_Compact()
256256

257257
freeRegion->Unlink();
258258

259-
#ifdef _DEBUG
259+
#ifdef DEBUG
260260

261261
_ASSERTE(relocCurrent->m_destination >= (CLR_UINT8 *)g_CLR_RT_ExecutionEngine.m_heap.FirstNode());
262262
_ASSERTE(relocCurrent->m_destination < (CLR_UINT8 *)g_CLR_RT_ExecutionEngine.m_heap.LastNode());
263263
_ASSERTE(relocCurrent->m_start >= (CLR_UINT8 *)g_CLR_RT_ExecutionEngine.m_heap.FirstNode());
264264
_ASSERTE(relocCurrent->m_start < (CLR_UINT8 *)g_CLR_RT_ExecutionEngine.m_heap.LastNode());
265-
_ASSERTE(moveBytes <= freeRegion_Size);
265+
_ASSERTE(moveBytes <= (move * sizeof(CLR_RT_HeapBlock)));
266266

267267
#endif
268268

0 commit comments

Comments
 (0)