win32: increase stack size to 8 MB
and double safety margin for Win64
This commit is contained in:
parent
ddbb3b02a1
commit
4377d88e86
|
@ -532,6 +532,12 @@
|
|||
|
||||
# define DO_STACK_CHECK
|
||||
# define WINDOWS_FIND_STACK_BOUNDS
|
||||
/* This value needs to be consistent with the
|
||||
stack size specified at link time: */
|
||||
# define WINDOWS_DEFAULT_STACK_SIZE 8388608
|
||||
# ifdef _WIN64
|
||||
# define STACK_SAFETY_MARGIN 100000
|
||||
# endif
|
||||
|
||||
# ifndef _WIN64
|
||||
# define USE_MZ_SETJMP
|
||||
|
|
|
@ -543,7 +543,7 @@ void scheme_init_stack_check()
|
|||
|
||||
# ifdef WINDOWS_FIND_STACK_BOUNDS
|
||||
scheme_stack_boundary = scheme_get_current_os_thread_stack_base();
|
||||
scheme_stack_boundary += (STACK_SAFETY_MARGIN - 0x100000);
|
||||
scheme_stack_boundary += (STACK_SAFETY_MARGIN - WINDOWS_DEFAULT_STACK_SIZE);
|
||||
# endif
|
||||
|
||||
# ifdef MACOS_FIND_STACK_BOUNDS
|
||||
|
|
|
@ -228,6 +228,7 @@
|
|||
(map (lambda (f) (build-path "../../racket/" f))
|
||||
'("include/scheme.h"
|
||||
"include/schthread.h"
|
||||
"sconfig.h"
|
||||
"src/schpriv.h"
|
||||
"src/stypes.h"))
|
||||
(map (lambda (f) (build-path "../../racket/gc2/" f))
|
||||
|
@ -260,10 +261,9 @@
|
|||
(> (file-or-directory-modify-seconds f)
|
||||
ms))
|
||||
objs)
|
||||
(unless (system- (format "~a ~a ~a /MT /Zi /Fe~a ~a ~a /link ~a~a~a"
|
||||
(unless (system- (format "~a ~a /MT /Zi /Fe~a ~a ~a /link ~a~a~a~a~a"
|
||||
cl.exe
|
||||
(if exe? "" "/LD /DLL")
|
||||
(if win64? "/MACHINE:x64" "")
|
||||
dll
|
||||
(let loop ([objs (append objs sys-libs)])
|
||||
(if (null? objs)
|
||||
|
@ -282,6 +282,8 @@
|
|||
" "
|
||||
(loop (cdr delayloads)))))
|
||||
link-options
|
||||
(if exe? " /STACK:8388608" "")
|
||||
(if win64? " /MACHINE:x64" "")
|
||||
(let ([s (regexp-match "^(.*)/([a-z0-9]*)[.]dll$" dll)])
|
||||
(if s
|
||||
(format " /IMPLIB:~a/msvc/~a.lib"
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="..\..\..\GRacketCGC.pdb"
|
||||
SubSystem="2"
|
||||
StackReserveSize="8388608"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
/>
|
||||
|
@ -157,6 +158,7 @@
|
|||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="..\..\..\GRacketCGC.pdb"
|
||||
SubSystem="2"
|
||||
StackReserveSize="8388608"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
/>
|
||||
|
@ -243,6 +245,7 @@
|
|||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="..\..\..\GRacketCGC.pdb"
|
||||
SubSystem="2"
|
||||
StackReserveSize="8388608"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="17"
|
||||
|
@ -325,6 +328,7 @@
|
|||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="..\..\..\GRacketCGC.pdb"
|
||||
SubSystem="2"
|
||||
StackReserveSize="8388608"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="17"
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="..\..\..\RacketCGC.pdb"
|
||||
SubSystem="1"
|
||||
StackReserveSize="8388608"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
/>
|
||||
|
@ -160,6 +161,7 @@
|
|||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="..\..\..\RacketCGC.pdb"
|
||||
SubSystem="1"
|
||||
StackReserveSize="8388608"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="17"
|
||||
|
@ -249,6 +251,7 @@
|
|||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="..\..\..\RacketCGC.pdb"
|
||||
SubSystem="1"
|
||||
StackReserveSize="8388608"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
/>
|
||||
|
@ -338,6 +341,7 @@
|
|||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="..\..\..\RacketCGC.pdb"
|
||||
SubSystem="1"
|
||||
StackReserveSize="8388608"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="17"
|
||||
|
@ -427,6 +431,7 @@
|
|||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="..\..\..\RacketCGC.pdb"
|
||||
SubSystem="1"
|
||||
StackReserveSize="8388608"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
/>
|
||||
|
@ -516,6 +521,7 @@
|
|||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="..\..\..\RacketCGC.pdb"
|
||||
SubSystem="1"
|
||||
StackReserveSize="8388608"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="17"
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>..\..\..\GRacketCGC.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<StackReserveSize>8388608</StackReserveSize>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
|
@ -104,6 +105,7 @@
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>..\..\..\GRacketCGC.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<StackReserveSize>8388608</StackReserveSize>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
|
@ -142,6 +144,7 @@
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>..\..\..\GRacketCGC.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<StackReserveSize>8388608</StackReserveSize>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
|
@ -178,6 +181,7 @@
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>..\..\..\GRacketCGC.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<StackReserveSize>8388608</StackReserveSize>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>..\..\..\RacketCGC.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<StackReserveSize>8388608</StackReserveSize>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
|
@ -115,6 +116,7 @@
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>..\..\..\RacketCGC.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<StackReserveSize>8388608</StackReserveSize>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
|
@ -163,6 +165,7 @@
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>..\..\..\RacketCGC.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<StackReserveSize>8388608</StackReserveSize>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
|
@ -213,6 +216,7 @@
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>..\..\..\RacketCGC.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<StackReserveSize>8388608</StackReserveSize>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
|
|
Loading…
Reference in New Issue
Block a user