mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Add nasty test case that overflows the stack with a repeated group
This commit is contained in:
@@ -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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user