Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
80f638fe
Commit
80f638fe
authored
Jun 03, 2015
by
Damien George
Browse files
tests: Add test for recursive iternext stack overflow.
parent
953c23b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/misc/recursive_iternext.py
0 → 100644
View file @
80f638fe
# This tests that recursion with iternext doesn't lead to segfault.
try
:
x
=
(
1
,
2
)
for
i
in
range
(
1000
):
x
=
enumerate
(
x
)
tuple
(
x
)
except
RuntimeError
:
print
(
"RuntimeError"
)
try
:
x
=
(
1
,
2
)
for
i
in
range
(
1000
):
x
=
filter
(
None
,
x
)
tuple
(
x
)
except
RuntimeError
:
print
(
"RuntimeError"
)
try
:
x
=
(
1
,
2
)
for
i
in
range
(
1000
):
x
=
map
(
max
,
x
,
())
tuple
(
x
)
except
RuntimeError
:
print
(
"RuntimeError"
)
try
:
x
=
(
1
,
2
)
for
i
in
range
(
1000
):
x
=
zip
(
x
)
tuple
(
x
)
except
RuntimeError
:
print
(
"RuntimeError"
)
tests/misc/recursive_iternext.py.exp
0 → 100644
View file @
80f638fe
RuntimeError
RuntimeError
RuntimeError
RuntimeError
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment