Skip to content

Commit

Permalink
Even better fix -- increase stack space on Windows in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum committed Nov 1, 2023
1 parent 19d9d40 commit 03de1bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions Include/cpython/pystate.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,7 @@ struct _ts {
# define Py_C_RECURSION_LIMIT 500
#else
// This value is duplicated in Lib/test/support/__init__.py
# if defined(MS_WINDOWS) && defined(Py_DEBUG)
// On Windows in debug mode the interpreter uses more stack space
# define Py_C_RECURSION_LIMIT 1000
# else
# define Py_C_RECURSION_LIMIT 1500
# endif
# define Py_C_RECURSION_LIMIT 1500
#endif


Expand Down
2 changes: 1 addition & 1 deletion PCbuild/python.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<Link>
<SubSystem>Console</SubSystem>
<StackReserveSize Condition="$(Configuration) != 'Debug'">2000000</StackReserveSize>
<StackReserveSize Condition="$(Configuration) == 'Debug'">8000000</StackReserveSize>
<StackReserveSize Condition="$(Configuration) == 'Debug'">12000000</StackReserveSize>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down

0 comments on commit 03de1bf

Please sign in to comment.