Skip to content

Commit 005d5ab

Browse files
committed
Temporarily disable asserts in AllocationPolicyManager
Asserts are causing spurious failures and at this point are not very helpful. Will re-enable once the actual root cause is found and fixed. Related:#5191
1 parent 6182e54 commit 005d5ab

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/Common/Memory/AllocationPolicyManager.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ typedef bool (__stdcall * PageAllocatorMemoryAllocationCallback)(__in LPVOID con
5050

5151
~AllocationPolicyManager()
5252
{
53-
Assert(currentMemory == 0);
53+
// TODO: https://github.com/Microsoft/ChakraCore/issues/5191
54+
// enable the assert when the offending code is fixed.
55+
// Assert(currentMemory == 0);
5456
}
5557

5658
size_t GetUsage()
@@ -155,7 +157,10 @@ typedef bool (__stdcall * PageAllocatorMemoryAllocationCallback)(__in LPVOID con
155157

156158
inline void ReportFreeImpl(MemoryAllocateEvent allocationEvent, size_t byteCount)
157159
{
158-
Assert(currentMemory >= byteCount);
160+
// TODO: https://github.com/Microsoft/ChakraCore/issues/5191
161+
// enable the assert when the offending code is fixed.
162+
// Assert(currentMemory >= byteCount);
163+
byteCount = min(byteCount, currentMemory);
159164

160165
currentMemory = currentMemory - byteCount;
161166

0 commit comments

Comments
 (0)