Revision: 7558
Author:   [email protected]
Date:     Fri Apr  8 04:37:30 2011
Log: ARM: Fix a crash bug in code for %_IsStringWrapperSafeForDefaultValueOf

Turned out out that the setting of bit Map::kStringWrapperSafeForDefaultValueOf in Map::kStringWrapperSafeForDefaultValueOf was not done on the map but in some other memory location causing crashes.

[email protected]

BUG=none
TEST=mozilla/data/js1_2/String/slice.js (crashed only on ARM hardware)

Review URL: http://codereview.chromium.org//6816054
http://code.google.com/p/v8/source/detail?r=7558

Modified:
 /branches/bleeding_edge/src/arm/full-codegen-arm.cc

=======================================
--- /branches/bleeding_edge/src/arm/full-codegen-arm.cc Thu Apr 7 07:45:34 2011 +++ /branches/bleeding_edge/src/arm/full-codegen-arm.cc Fri Apr 8 04:37:30 2011
@@ -2595,9 +2595,9 @@

   // Set the bit in the map to indicate that it has been checked safe for
   // default valueOf and set true result.
-  __ ldrb(r2, FieldMemOperand(r4, Map::kBitField2Offset));
+  __ ldrb(r2, FieldMemOperand(r1, Map::kBitField2Offset));
   __ orr(r2, r2, Operand(1 << Map::kStringWrapperSafeForDefaultValueOf));
-  __ strb(r2, FieldMemOperand(r4, Map::kBitField2Offset));
+  __ strb(r2, FieldMemOperand(r1, Map::kBitField2Offset));
   __ jmp(if_true);

   PrepareForBailoutBeforeSplit(TOS_REG, true, if_true, if_false);

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

Reply via email to