From b6551b83a557508f1dfc36bf34fafa76889431d1 Mon Sep 17 00:00:00 2001 From: "vegorov@chromium.org" Date: Thu, 16 Feb 2012 14:16:12 +0000 Subject: [PATCH] Increase ARM/MIPS simulators stack safety margin to 1024 bytes Based on r9686 (10e1ea5). BUG= TEST=mozilla regress-355497.js Review URL: https://chromiumcodereview.appspot.com/9309030 Patch from Daniel Kalmar . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/simulator-arm.cc | 4 ++-- src/mips/simulator-mips.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/arm/simulator-arm.cc b/src/arm/simulator-arm.cc index 1ae172c..629c209 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(stack_) + 512; + return reinterpret_cast(stack_) + 1024; } diff --git a/src/mips/simulator-mips.cc b/src/mips/simulator-mips.cc index a158f04..f31ce7e 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(stack_) + 512; + return reinterpret_cast(stack_) + 1024; } -- 2.7.4