Reviewers: Michael Starzinger,
Message:
PTAL.
Description:
Off-by-one error in zapping objects after right trimming.
Please review this at https://chromiumcodereview.appspot.com/11013012/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/objects.cc
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index
e772d54e592a0f6df8d02466750eb490c5d50eea..c37a4a8b2086be48e881634f36f36acf034cc56c
100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -2176,11 +2176,13 @@ enum RightTrimMode { FROM_GC, FROM_MUTATOR };
static void ZapEndOfFixedArray(Address new_end, int to_trim) {
// If we are doing a big trim in old space then we zap the space.
Object** zap = reinterpret_cast<Object**>(new_end);
+ zap++; // Header of filler must be at least one word so skip that.
for (int i = 1; i < to_trim; i++) {
*zap++ = Smi::FromInt(0);
}
}
+
template<RightTrimMode trim_mode>
static void RightTrimFixedArray(Heap* heap, FixedArray* elms, int to_trim)
{
ASSERT(elms->map() != HEAP->fixed_cow_array_map());
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev