mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
SF bug 690622: test_cpickle overflows stack on MacOS9.
test_nonrecursive_deep(): Reduced nesting depth to 60. Not a bugfix candidate. 2.3 increased the number of stack frames needed to pickle a list (in order to get implement the "list batching" unpickling memory optimization new in 2.3).
This commit is contained in:
parent
f5dd753f4d
commit
7107a7fbcc
1 changed files with 5 additions and 1 deletions
|
@ -81,8 +81,12 @@ class cPickleFastPicklerTests(AbstractPickleTests):
|
|||
self)
|
||||
|
||||
def test_nonrecursive_deep(self):
|
||||
# If it's not cyclic, it should pickle OK even if the nesting
|
||||
# depth exceeds PY_CPICKLE_FAST_LIMIT. That happens to be
|
||||
# 50 today. Jack Jansen reported stack overflow on Mac OS 9
|
||||
# at 64.
|
||||
a = []
|
||||
for i in range(100):
|
||||
for i in range(60):
|
||||
a = [a]
|
||||
b = self.loads(self.dumps(a))
|
||||
self.assertEqual(a, b)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue