From: Andrew M. Kuchling Date: Thu, 3 Aug 2000 02:06:45 +0000 (+0000) Subject: Add nasty test case that overflows the stack with a repeated group X-Git-Tag: v2.0b1~613 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a3eacc472ce00d0579586d41bfd0df99f9bf039d;p=python Add nasty test case that overflows the stack with a repeated group --- diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index c3c70bc4c4..46f442d257 100644 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -28,6 +28,10 @@ try: except: raise TestFailed, "re.search" +# Try nasty case that overflows the straightforward recursive +# implementation of repeated groups. +assert re.match('(x)*', 50000*'x').span() == (0, 50000) + if verbose: print 'Running tests on re.sub'