[Python-checkins] r88719 - python/branches/py3k/Lib/test/crashers/compiler_recursion.py

nick.coghlan python-checkins at python.org
Thu Mar 3 12:08:33 CET 2011


Author: nick.coghlan
Date: Thu Mar  3 12:08:33 2011
New Revision: 88719

Log:
Update compiler recursion crasher to more reliably blow the stack and add a tracker issue for it

Modified:
   python/branches/py3k/Lib/test/crashers/compiler_recursion.py

Modified: python/branches/py3k/Lib/test/crashers/compiler_recursion.py
==============================================================================
--- python/branches/py3k/Lib/test/crashers/compiler_recursion.py	(original)
+++ python/branches/py3k/Lib/test/crashers/compiler_recursion.py	Thu Mar  3 12:08:33 2011
@@ -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')


More information about the Python-checkins mailing list