Skip to content

Commit 00e7f7e

Browse files
author
Atul Katti
committed
[MERGE #5524 @atulkatti] MSFT:18103621 During ReleasePagesShutdown allocators may not have been closed yet, if we are cleaning up the blocks in RecyclerSweep instance.
Merge pull request #5524 from atulkatti:Bug18103621.ShutdownCleanupAssert.1
2 parents a9358ce + 85db038 commit 00e7f7e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Common/Memory/HeapBlock.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,9 @@ SmallHeapBlockT<TBlockAttributes>::ReleasePagesShutdown(Recycler * recycler)
472472

473473
// Don't release the page in shut down, the page allocator will release them faster
474474
// Leaf block's allocator need not be closed
475-
Assert(this->IsLeafBlock() || this->GetPageAllocator()->IsClosed());
475+
// For non-large normal heap blocks ReleasePagesShutdown could be called during shutdown cleanup when the block is still pending concurrent
476+
// sweep i.e. it resides in the pendingSweepList of the RecyclerSweep instance. In this case the page allocator may not have been closed yet.
477+
Assert(this->IsLeafBlock() || this->GetPageAllocator()->IsClosed() || this->isPendingConcurrentSweep);
476478
#endif
477479

478480
}

0 commit comments

Comments
 (0)