mirror of https://github.com/python/cpython
Add nasty test case that overflows the stack with a repeated group
This commit is contained in:
parent
e365fb8d1f
commit
a3eacc472c
|
@ -28,6 +28,10 @@ try:
|
||||||
except:
|
except:
|
||||||
raise TestFailed, "re.search"
|
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:
|
if verbose:
|
||||||
print 'Running tests on re.sub'
|
print 'Running tests on re.sub'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue