This lead to crashes in some complex code where a
pointer was just pointing to the end of the allocated chunk,
and we'd then read outside the chunk bounds for marking.
Change-Id: Ica41c4e98eb9901fbb8d291289a9c91078ded111
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
for (QVector<Data::Chunk>::Iterator it = m_d->heapChunks.begin(), end =
m_d->heapChunks.end(); it != end; ++it) {
heapChunkBoundaries[i++] = reinterpret_cast<char*>(it->memory.base());
- heapChunkBoundaries[i++] = reinterpret_cast<char*>(it->memory.base()) + it->memory.size();
+ heapChunkBoundaries[i++] = reinterpret_cast<char*>(it->memory.base()) + it->memory.size() - it->chunkSize;
}
for (; current < top; ++current) {