changeset 68213:a4e7fbed753c

Update compiler recursion crasher to more reliably blow the stack and add a tracker issue for it
author Nick Coghlan <ncoghlan@gmail.com>
date Thu, 03 Mar 2011 11:08:33 +0000
parents 0dc6a90dee21
children 738feec9ced0
files Lib/test/crashers/compiler_recursion.py
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Lib/test/crashers/compiler_recursion.py	Thu Mar 03 05:27:17 2011 +0000
+++ b/Lib/test/crashers/compiler_recursion.py	Thu Mar 03 11:08:33 2011 +0000
@@ -1,5 +1,13 @@
 """
-The compiler (>= 2.5) recurses happily.
+The compiler (>= 2.5) recurses happily until it blows the stack.
+
+Recorded on the tracker as http://bugs.python.org/issue11383
 """
 
-compile('()'*9**5, '?', 'exec')
+# 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 100k should do the trick most places
+compile('()'*10**5, '?', 'exec')