From ebf9b8ab851e776e44187e54aa19020e1e948385 Mon Sep 17 00:00:00 2001 From: "ulan@chromium.org" Date: Fri, 19 Sep 2014 11:26:36 +0000 Subject: [PATCH] ARM: Make stack limit stricter to account for large buffers in MacroAssembler. BUG=405338 LOG=Y R=rmcilroy@chromium.org, rodolph.perfetta@arm.com Review URL: https://codereview.chromium.org/583163002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/flag-definitions.h | 4 +--- src/globals.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/flag-definitions.h b/src/flag-definitions.h index 0caca9f..0d4f395 100644 --- a/src/flag-definitions.h +++ b/src/flag-definitions.h @@ -471,9 +471,7 @@ DEFINE_BOOL(enable_liveedit, true, "enable liveedit experimental feature") DEFINE_BOOL(hard_abort, true, "abort by crashing") // execution.cc -// Slightly less than 1MB, since Windows' default stack size for -// the main execution thread is 1MB for both 32 and 64-bit. -DEFINE_INT(stack_size, 984, +DEFINE_INT(stack_size, V8_DEFAULT_STACK_SIZE_KB, "default size of stack region v8 is allowed to use (in kBytes)") // frames.cc diff --git a/src/globals.h b/src/globals.h index 3eb95c6..38deb3e 100644 --- a/src/globals.h +++ b/src/globals.h @@ -68,6 +68,18 @@ namespace internal { // Determine whether the architecture uses an out-of-line constant pool. #define V8_OOL_CONSTANT_POOL 0 +#ifdef V8_TARGET_ARCH_ARM +// Set stack limit lower for ARM than for other architectures because +// stack allocating MacroAssembler takes 120K bytes. +// See issue crbug.com/405338 +#define V8_DEFAULT_STACK_SIZE_KB 864 +#else +// Slightly less than 1MB, since Windows' default stack size for +// the main execution thread is 1MB for both 32 and 64-bit. +#define V8_DEFAULT_STACK_SIZE_KB 984 +#endif + + // Support for alternative bool type. This is only enabled if the code is // compiled with USE_MYBOOL defined. This catches some nasty type bugs. // For instance, 'bool b = "false";' results in b == true! This is a hidden -- 2.7.4