From 0ce4f36c7afbb6ea550c3aaa4c9a520a73b38643 Mon Sep 17 00:00:00 2001 From: Henri Sivonen Date: Thu, 14 Sep 2017 11:39:43 +0300 Subject: [PATCH] Bug 256180 build config part - Increase the max size for the runtime stack on Windows. r=glandium. --- config/config.mk | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/config/config.mk b/config/config.mk index 7ff5273bd200..28595e711910 100644 --- a/config/config.mk +++ b/config/config.mk @@ -302,13 +302,22 @@ endif # WINNT ifdef _MSC_VER ifeq ($(CPU_ARCH),x86_64) -ifdef MOZ_ASAN -# ASan could have 3x stack memory usage of normal builds. -WIN32_EXE_LDFLAGS += -STACK:6291456 +# Normal operation on 64-bit Windows needs 2 MB of stack. (Bug 582910) +# ASAN requires 6 MB of stack. +# Setting the stack to 8 MB to match the capability of other systems +# to deal with frame construction for unreasonably deep DOM trees +# with worst-case styling. This uses address space unnecessarily for +# non-main threads, but that should be tolerable on 64-bit systems. +# (Bug 256180) +WIN32_EXE_LDFLAGS += -STACK:8388608 else -# set stack to 2MB on x64 build. See bug 582910 -WIN32_EXE_LDFLAGS += -STACK:2097152 -endif +# Since this setting affects the default stack size for non-main +# threads, too, to avoid burning the address space, increase only +# 512 KB over the default. Just enough to be able to deal with +# reasonable styling applied to DOM trees whose depth is near what +# Blink's HTML parser can output, esp. +# layout/base/crashtests/507119.html (Bug 256180) +WIN32_EXE_LDFLAGS += -STACK:1572864 endif endif