Changeset 34617 in webkit
- Timestamp:
- Jun 16, 2008 11:22:46 PM (16 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r34615 r34617 1 2008-06-16 Cameron Zwarich <cwzwarich@uwaterloo.ca> 2 3 Reviewed by Maciej. 4 5 Bug 19596: LEAK: Gmail leaks SegmentedVector<RegisterID> 6 <https://bugs.webkit.org/show_bug.cgi?id=19596> 7 8 When growing SegmentedVector, we start adding segments at the position 9 of the last segment, overwriting it. The destructor frees allocated 10 segments starting at the segment of index 1, because the segment of 11 index 0 is assumed to be the initial inline segment. This causes a leak 12 of the segment that is referenced by index 0. Modifying grow() so that 13 it starts adding segments at the position after the last segment fixes 14 the leak. 15 16 Since the initial segment is a special case in the lookup code, this 17 bug never manifested itself via incorrect results. 18 19 * VM/SegmentedVector.h: 20 (KJS::SegmentedVector::grow): 21 1 22 2008-06-16 Maciej Stachowiak <mjs@apple.com> 2 23 -
trunk/JavaScriptCore/VM/SegmentedVector.h
r34372 r34617 145 145 146 146 ASSERT(oldSize < m_segments.size()); 147 for (size_t i = oldSize - 1; i < (numSegments - 1); i++) {147 for (size_t i = oldSize; i < (numSegments - 1); i++) { 148 148 Segment* segment = new Segment; 149 149 segment->resize(SegmentSize);
Note: See TracChangeset
for help on using the changeset viewer.