mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Add nasty test case that overflows the stack with a repeated group
This commit is contained in:
parent
e365fb8d1f
commit
a3eacc472c
1 changed files with 4 additions and 0 deletions
|
@ -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'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue