From: Nick Coghlan Date: Thu, 3 Mar 2011 11:08:33 +0000 (+0000) Subject: Update compiler recursion crasher to more reliably blow the stack and add a tracker... X-Git-Tag: v3.3.0a1~3007 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8370bb952809f72b387f11e58aa7b0452e383915;p=python Update compiler recursion crasher to more reliably blow the stack and add a tracker issue for it --- diff --git a/Lib/test/crashers/compiler_recursion.py b/Lib/test/crashers/compiler_recursion.py index 4954bdd8f0..8fd93fcdd4 100644 --- a/Lib/test/crashers/compiler_recursion.py +++ b/Lib/test/crashers/compiler_recursion.py @@ -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')