Revision: 12637
Author:   [email protected]
Date:     Mon Oct  1 02:48:07 2012
Log:      Off-by-one error in zapping objects after right trimming.

Review URL: https://chromiumcodereview.appspot.com/11013012
http://code.google.com/p/v8/source/detail?r=12637

Modified:
 /branches/bleeding_edge/src/objects.cc

=======================================
--- /branches/bleeding_edge/src/objects.cc      Fri Sep 28 03:15:58 2012
+++ /branches/bleeding_edge/src/objects.cc      Mon Oct  1 02:48:07 2012
@@ -2176,10 +2176,12 @@
 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) {

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to