From 4a1eba48a10c7b4eae8e0f5dc8ee80edc23b8e63 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 5 Feb 2013 22:49:26 +0100 Subject: [PATCH] Fix GC for the last object in a chunk. heapChunkBoundariesEnd points to the last entry in a chunk, so include it as a valid address to be candidate for marking. Change-Id: Ieb1fbb494ae2fd8ee5d38ae59529cf441fbcd729 Reviewed-by: Lars Knoll --- src/v4/qv4mm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v4/qv4mm.cpp b/src/v4/qv4mm.cpp index 8e85001..7e60e00 100644 --- a/src/v4/qv4mm.cpp +++ b/src/v4/qv4mm.cpp @@ -370,7 +370,7 @@ void MemoryManager::collectFromStack() const reinterpret_cast(*current); #endif - if (genericPtr < *heapChunkBoundaries || genericPtr >= *(heapChunkBoundariesEnd - 1)) + if (genericPtr < *heapChunkBoundaries || genericPtr > *(heapChunkBoundariesEnd - 1)) continue; int index = qLowerBound(heapChunkBoundaries, heapChunkBoundariesEnd, genericPtr) - heapChunkBoundaries; // An odd index means the pointer is _before_ the end of a heap chunk and therefore valid. -- 2.7.4