[Arm64] Reduce default stack-size to be the same as on Arm.

When running in single-process mode for Webview, the stack limit is
initialized from a point closer to the top of stack limit. This causes
can cause crashes since the stack limit might be higher than the actual
native stack limit (which is 1MB on Android). As such, use the same
slightly lower stack limit on Arm64 as we do on Arm to give more slack.

BUG=v8:10575

Change-Id: I0cdd0cb4b38aafcb4e158ed639ecf3bba2edb785
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2250241
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68405}
This commit is contained in:
Ross McIlroy 2020-06-17 21:45:32 +01:00 committed by Commit Bot
parent 080a6c7775
commit 79ed10cfb1

View File

@ -68,10 +68,13 @@ constexpr int GB = MB * 1024;
#define V8_EMBEDDED_CONSTANT_POOL false
#endif
#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
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64
// Set stack limit lower for ARM and ARM64 than for other architectures because:
// - on Arm stack allocating MacroAssembler takes 120K bytes.
// See issue crbug.com/405338
// - on Arm64 when running in single-process mode for Android WebView, when
// initializing V8 we already have a large stack and so have to set the
// limit lower. See issue crbug.com/v8/10575
#define V8_DEFAULT_STACK_SIZE_KB 864
#else
// Slightly less than 1MB, since Windows' default stack size for