summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-08-29 18:44:54 (GMT)
committerGuido van Rossum <guido@python.org>2007-08-29 18:44:54 (GMT)
commit991bf5d8c8fdd94c3b9238d7111c0dfb41973804 (patch)
treefa3655e648ebdd13776ddd3ef44c5f1abb288da8 /Lib
parentcf3c4217c755164a6b762c5846ee82636565d6f0 (diff)
downloadcpython-991bf5d8c8fdd94c3b9238d7111c0dfb41973804.zip
cpython-991bf5d8c8fdd94c3b9238d7111c0dfb41973804.tar.gz
cpython-991bf5d8c8fdd94c3b9238d7111c0dfb41973804.tar.bz2
Patch # 1050 by Amaury Forgeot d'Arc.
On Windows, debug builds insert stack probes, and recursive functions tend to exhaust the stack faster. This patch reduces the marshal maximum depth from 2000 to 1500 for debug builds only. Optimized builds are not affected. This allows test_marshal to pass with debug builds.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_marshal.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_marshal.py b/Lib/test/test_marshal.py
index 6efa416..47e610f 100644
--- a/Lib/test/test_marshal.py
+++ b/Lib/test/test_marshal.py
@@ -169,7 +169,10 @@ class BugsTestCase(unittest.TestCase):
# Create a deeply nested structure.
head = last = []
# The max stack depth should match the value in Python/marshal.c.
- MAX_MARSHAL_STACK_DEPTH = 2000
+ if os.name == 'nt' and hasattr(sys, 'gettotalrefcount'):
+ MAX_MARSHAL_STACK_DEPTH = 1500
+ else:
+ MAX_MARSHAL_STACK_DEPTH = 2000
for i in range(MAX_MARSHAL_STACK_DEPTH - 2):
last.append([0])
last = last[-1]