Revision: 8717
Author:   [email protected]
Date:     Fri Jul 22 02:03:55 2011
Log:      Fixed an off-by-one error in SplitConstantsInFullCompiler test.

The test tried to disassemble the last entry in a constant pool, which only
worked by accident until address randomization was introduced.
Review URL: http://codereview.chromium.org/7489005
http://code.google.com/p/v8/source/detail?r=8717

Modified:
 /branches/bleeding_edge/test/cctest/test-compiler.cc

=======================================
--- /branches/bleeding_edge/test/cctest/test-compiler.cc Mon Jul 4 01:57:43 2011 +++ /branches/bleeding_edge/test/cctest/test-compiler.cc Fri Jul 22 02:03:55 2011
@@ -377,7 +377,7 @@
     while (pc < end) {
       int num_const = d.ConstantPoolSizeAt(pc);
       if (num_const >= 0) {
-        pc += num_const * kPointerSize;
+        pc += (num_const + 1) * kPointerSize;
       } else {
         pc += d.InstructionDecode(decode_buffer, pc);
         CHECK(strstr(decode_buffer.start(), "mov eax,0x178c29c") == NULL);

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

Reply via email to