mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
-- don't use recursion for unbounded non-greedy repeat
(bugs #115903, #115696) This is based on a patch by Darrel Gallion. I'm not 100% sure about this fix, but I haven't managed to come up with any test case it cannot handle...
This commit is contained in:
parent
07e99cb774
commit
fa25a7d51f
2 changed files with 14 additions and 3 deletions
|
@ -248,7 +248,7 @@ test(r"""sre.match(r'(x)*', 50000*'x').span()""",
|
|||
test(r"""sre.match(r'(x)*y', 50000*'x'+'y').span()""",
|
||||
(0, 50001), RuntimeError)
|
||||
test(r"""sre.match(r'(x)*?y', 50000*'x'+'y').span()""",
|
||||
(0, 50001), RuntimeError)
|
||||
(0, 50001)) # this works in 2.1
|
||||
|
||||
from re_tests import *
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue