Skip to content

Commit

Permalink
pythongh-113655: Increase default stack size for PGO builds to avoid …
Browse files Browse the repository at this point in the history
…C stack exhaustion (pythonGH-114148)
  • Loading branch information
zooba committed Jan 16, 2024
1 parent b331381 commit 2e672f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion PCbuild/python.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,11 @@
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<StackReserveSize Condition="$(Configuration) != 'Debug'">2000000</StackReserveSize>
<StackReserveSize>2000000</StackReserveSize>
<StackReserveSize Condition="$(Configuration) == 'Debug'">12000000</StackReserveSize>
<StackReserveSize Condition="$(Configuration) == 'PGInstrument'">12000000</StackReserveSize>
<!-- HACK: Need additional memory to avoid crashing until gh-113655 is fixed -->
<StackReserveSize Condition="$(Configuration) == 'PGUpdate'">3000000</StackReserveSize>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
7 changes: 5 additions & 2 deletions PCbuild/pythonw.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@
</PropertyGroup>
<ItemDefinitionGroup>
<Link>
<StackReserveSize Condition="$(Configuration) != 'Debug'">2000000</StackReserveSize>
<StackReserveSize Condition="$(Configuration) == 'Debug'">8000000</StackReserveSize>
<StackReserveSize>2000000</StackReserveSize>
<StackReserveSize Condition="$(Configuration) == 'Debug'">12000000</StackReserveSize>
<StackReserveSize Condition="$(Configuration) == 'PGInstrument'">12000000</StackReserveSize>
<!-- HACK: Need additional memory to avoid crashing until gh-113655 is fixed -->
<StackReserveSize Condition="$(Configuration) == 'PGUpdate'">3000000</StackReserveSize>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down

0 comments on commit 2e672f7

Please sign in to comment.