diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2000-08-03 02:06:45 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2000-08-03 02:06:45 (GMT) |
commit | a3eacc472ce00d0579586d41bfd0df99f9bf039d (patch) | |
tree | 07d6a1e1b366e975e1b936987680daf5f2630d98 /Lib/test/test_re.py | |
parent | e365fb8d1ff062d619f9476265e48e9ba8ab2bf6 (diff) | |
download | cpython-a3eacc472ce00d0579586d41bfd0df99f9bf039d.zip cpython-a3eacc472ce00d0579586d41bfd0df99f9bf039d.tar.gz cpython-a3eacc472ce00d0579586d41bfd0df99f9bf039d.tar.bz2 |
Add nasty test case that overflows the stack with a repeated group
Diffstat (limited to 'Lib/test/test_re.py')
-rw-r--r-- | Lib/test/test_re.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index c3c70bc..46f442d 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' |