Reviewers: Erik Corry,

Description:
Fix Kraken segfaults on ARM.

DoStoreKeyedFastElement was passing incorrect slot address (off by 1) to the
RecordWrite.

[email protected]
BUG=v8:1742


Please review this at http://codereview.chromium.org/8139026/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/arm/lithium-codegen-arm.cc


Index: src/arm/lithium-codegen-arm.cc
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
index f6750a299d9434201c7986c0d06bae43e1aad6a4..cc3262a055b65ff8119900f2a6950109877f302f 100644
--- a/src/arm/lithium-codegen-arm.cc
+++ b/src/arm/lithium-codegen-arm.cc
@@ -3363,7 +3363,7 @@ void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) {

   if (instr->hydrogen()->NeedsWriteBarrier()) {
     // Compute address of modified element and store it into key register.
-    __ add(key, scratch, Operand(FixedArray::kHeaderSize));
+    __ add(key, scratch, Operand(FixedArray::kHeaderSize - 1));
     __ RecordWrite(elements, key, value, kLRHasBeenSaved, kSaveFPRegs);
   }
 }


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

Reply via email to