From: Lars Knoll Date: Wed, 6 Feb 2013 08:05:47 +0000 (+0100) Subject: Also mark the last item in the last chunk X-Git-Tag: upstream/5.2.1~669^2~659^2~304 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f9ef6af133262e592db6e9374fffc86c6a88b0c;p=platform%2Fupstream%2Fqtdeclarative.git Also mark the last item in the last chunk Change-Id: I9af2232a987c1297cba08579e944b1c30d032088 Reviewed-by: Erik Verbruggen --- diff --git a/src/v4/qv4mm.cpp b/src/v4/qv4mm.cpp index 7e60e00..81d775f 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) 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.