Issue1965
Created on 2012-08-28.15:42:27 by thatch, last changed 2018-03-07.19:12:32 by jeff.allen.
msg7432 (view) |
Author: Tim Hatch (thatch) |
Date: 2012-08-28.15:42:26 |
|
I found this out in Pygments, where we use some alternations to match long strings/comments/etc in one go. Someone else (with a similar use case) has found this same problem at http://comments.gmane.org/gmane.comp.java.grinder.user/2325
To reproduce:
>>> x = re.compile(r'a+')
>>> x.match('a' * 22000)
<org.python.modules.sre.MatchObject object at 0x2>
Simply adding a grouping operator breaks it.
>>> x = re.compile(r'(?:a)+')
>>> x.match('a' * 22000)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: maximum recursion limit exceeded
With [Java HotSpot(TM) 64-Bit Server VM (Apple Inc.)] on java1.6.0_31
|
msg9500 (view) |
Author: Jim Baker (zyasoft) |
Date: 2015-02-08.06:01:09 |
|
Bug is still present in 2.7.0 trunk. We need to revisit our port of SRE.
Target 2.7.1 or later
|
msg11760 (view) |
Author: Jeff Allen (jeff.allen) |
Date: 2018-03-07.19:12:32 |
|
Still present:
PS bugs> jython
Jython 2.7.2a1+ (default:d74f8c2cd56f, Feb 24 2018, 17:18:53)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_151
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> m = re.compile(r'a+')
>>> m.match('a' * 22000)
<org.python.modules.sre.MatchObject object at 0x2>
>>> m = re.compile(r'(?:a)+')
>>> m.match('a' * 22000)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: maximum recursion limit exceeded
|
|
Date |
User |
Action |
Args |
2018-03-07 19:12:32 | jeff.allen | set | nosy:
+ jeff.allen messages:
+ msg11760 milestone: Jython 2.7.2 -> |
2015-12-29 23:55:26 | zyasoft | set | milestone: Jython 2.7.1 -> Jython 2.7.2 |
2015-04-20 21:06:09 | zyasoft | set | milestone: Jython 2.7.1 |
2015-02-08 06:01:09 | zyasoft | set | nosy:
+ zyasoft messages:
+ msg9500 |
2014-09-26 05:46:30 | zyasoft | set | resolution: accepted |
2013-02-19 21:40:40 | fwierzbicki | set | priority: normal nosy:
+ fwierzbicki versions:
+ Jython 2.5, Jython 2.7, - 2.5.3b1, 2.7a2 |
2012-08-28 22:03:55 | amak | set | nosy:
+ amak |
2012-08-28 15:42:27 | thatch | create | |
|