diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2012-11-04 13:14:34 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2012-11-04 13:14:34 (GMT) |
commit | aab9c2b2ead7b786947c367a9cc5d9c921b9ea99 (patch) | |
tree | 323a662a1f65b39e90d28f9f259bc937467691a7 /Lib/test/crashers | |
parent | 1321edaa55a8df94e739e6ea5e9e658f2b7bfcc2 (diff) | |
download | cpython-aab9c2b2ead7b786947c367a9cc5d9c921b9ea99.zip cpython-aab9c2b2ead7b786947c367a9cc5d9c921b9ea99.tar.gz cpython-aab9c2b2ead7b786947c367a9cc5d9c921b9ea99.tar.bz2 |
Issue #5765: Apply a hard recursion limit in the compiler
Previously, excessive nesting in expressions would blow the
stack and segfault the interpreter. Now, a hard limit based
on the configured recursion limit and a hardcoded scaling
factor is applied.
Diffstat (limited to 'Lib/test/crashers')
-rw-r--r-- | Lib/test/crashers/compiler_recursion.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/Lib/test/crashers/compiler_recursion.py b/Lib/test/crashers/compiler_recursion.py deleted file mode 100644 index 31f28a9..0000000 --- a/Lib/test/crashers/compiler_recursion.py +++ /dev/null @@ -1,13 +0,0 @@ -""" -The compiler (>= 2.5) recurses happily until it blows the stack. - -Recorded on the tracker as http://bugs.python.org/issue11383 -""" - -# The variant below blows up in compiler_call, but there are assorted -# other variations that blow up in other functions -# e.g. '1*'*10**5+'1' will die in compiler_visit_expr - -# The exact limit to destroy the stack will vary by platform -# but 10M should do the trick even with huge stack allocations -compile('()'*10**7, '?', 'exec') |