Skip to content

Commit 2e672f7

Browse files
authored
gh-113655: Increase default stack size for PGO builds to avoid C stack exhaustion (GH-114148)
1 parent b331381 commit 2e672f7

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

PCbuild/python.vcxproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,11 @@
9494
</ClCompile>
9595
<Link>
9696
<SubSystem>Console</SubSystem>
97-
<StackReserveSize Condition="$(Configuration) != 'Debug'">2000000</StackReserveSize>
97+
<StackReserveSize>2000000</StackReserveSize>
9898
<StackReserveSize Condition="$(Configuration) == 'Debug'">12000000</StackReserveSize>
99+
<StackReserveSize Condition="$(Configuration) == 'PGInstrument'">12000000</StackReserveSize>
100+
<!-- HACK: Need additional memory to avoid crashing until gh-113655 is fixed -->
101+
<StackReserveSize Condition="$(Configuration) == 'PGUpdate'">3000000</StackReserveSize>
99102
</Link>
100103
</ItemDefinitionGroup>
101104
<ItemGroup>

PCbuild/pythonw.vcxproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,11 @@
8989
</PropertyGroup>
9090
<ItemDefinitionGroup>
9191
<Link>
92-
<StackReserveSize Condition="$(Configuration) != 'Debug'">2000000</StackReserveSize>
93-
<StackReserveSize Condition="$(Configuration) == 'Debug'">8000000</StackReserveSize>
92+
<StackReserveSize>2000000</StackReserveSize>
93+
<StackReserveSize Condition="$(Configuration) == 'Debug'">12000000</StackReserveSize>
94+
<StackReserveSize Condition="$(Configuration) == 'PGInstrument'">12000000</StackReserveSize>
95+
<!-- HACK: Need additional memory to avoid crashing until gh-113655 is fixed -->
96+
<StackReserveSize Condition="$(Configuration) == 'PGUpdate'">3000000</StackReserveSize>
9497
</Link>
9598
</ItemDefinitionGroup>
9699
<ItemGroup>

0 commit comments

Comments
 (0)