Reviewers: danno, Vyacheslav Egorov, Paul Lind, kisg,

Message:
This patch is based on r9686.

regress-355497.js started failing again on MIPS.
Some investigation showed that MIPS requires a stack limit of ~600 bytes to pass the test. ARM is extremely close to the margin - the test fails with ~500 bytes
but passes with the current 512.

Description:
Increase ARM/MIPS simulators stack safety margin to 1024 bytes

Based on r9686 (10e1ea5).

BUG=
TEST=mozilla regress-355497.js


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

Affected files:
  M src/arm/simulator-arm.cc
  M src/mips/simulator-mips.cc


Index: src/arm/simulator-arm.cc
diff --git a/src/arm/simulator-arm.cc b/src/arm/simulator-arm.cc
index 1ae172c008d2bc95fef134bcbe7d0041c7016529..629c209ea2f30a3949ad123e51315d0e80bff0f3 100644
--- a/src/arm/simulator-arm.cc
+++ b/src/arm/simulator-arm.cc
@@ -1277,9 +1277,9 @@ void Simulator::WriteDW(int32_t addr, int32_t value1, int32_t value2) {

// Returns the limit of the stack area to enable checking for stack overflows.
 uintptr_t Simulator::StackLimit() const {
- // Leave a safety margin of 512 bytes to prevent overrunning the stack when + // Leave a safety margin of 1024 bytes to prevent overrunning the stack when
   // pushing values.
-  return reinterpret_cast<uintptr_t>(stack_) + 512;
+  return reinterpret_cast<uintptr_t>(stack_) + 1024;
 }


Index: src/mips/simulator-mips.cc
diff --git a/src/mips/simulator-mips.cc b/src/mips/simulator-mips.cc
index a158f045f50764f6fd2a87b85a02d207d015ed5d..f31ce7ea48a117437b3acb1b01ed4dbc76049427 100644
--- a/src/mips/simulator-mips.cc
+++ b/src/mips/simulator-mips.cc
@@ -1369,9 +1369,9 @@ void Simulator::WriteB(int32_t addr, int8_t value) {

// Returns the limit of the stack area to enable checking for stack overflows.
 uintptr_t Simulator::StackLimit() const {
- // Leave a safety margin of 512 bytes to prevent overrunning the stack when + // Leave a safety margin of 1024 bytes to prevent overrunning the stack when
   // pushing values.
-  return reinterpret_cast<uintptr_t>(stack_) + 512;
+  return reinterpret_cast<uintptr_t>(stack_) + 1024;
 }




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

Reply via email to