Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f6c69e6

Browse files
committed
#22734 marshal needs a lower stack depth for debug builds on Windows
1 parent 5368396 commit f6c69e6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/test/test_marshal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def test_recursion_limit(self):
188188
head = last = []
189189
# The max stack depth should match the value in Python/marshal.c.
190190
if os.name == 'nt' and hasattr(sys, 'gettotalrefcount'):
191-
MAX_MARSHAL_STACK_DEPTH = 1500
191+
MAX_MARSHAL_STACK_DEPTH = 1000
192192
else:
193193
MAX_MARSHAL_STACK_DEPTH = 2000
194194
for i in range(MAX_MARSHAL_STACK_DEPTH - 2):

Python/marshal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* On Windows debug builds, reduce this value.
2020
*/
2121
#if defined(MS_WINDOWS) && defined(_DEBUG)
22-
#define MAX_MARSHAL_STACK_DEPTH 1500
22+
#define MAX_MARSHAL_STACK_DEPTH 1000
2323
#else
2424
#define MAX_MARSHAL_STACK_DEPTH 2000
2525
#endif

0 commit comments

Comments
 (0)