Author jacques
Recipients akitada, amaury.forgeotdarc, collinwinter, ezio.melotti, georg.brandl, giampaolo.rodola, gregory.p.smith, jacques, jaylogan, jhalcrow, jimjjewett, loewis, mark, moreati, mrabarnett, nneonneo, pitrou, r.david.murray, rsc, sjmachin, timehorse, vbr
Date 2010-10-31.05:27:43
SpamBayes Score 0.000673522
Marked as misclassified No
Message-id <1288502869.34.0.474946634924.issue2636@psf.upfronthosting.co.za>
In-reply-to
Content
Here's one that really falls in the category of "don't do that";  but I found this because I was limiting the system recursion level to somewhat less than the standard 1000 (for other reasons), and I had some shorter duplicate patterns in a big regex.  Here is the simplest case to make it blow up with the standard recursion settings:

$ cat test.py
import re, regex
regexp = '(abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ|abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ)'
re.compile(regexp)
regex.compile(regexp)

$ python test.py
<snip big traceback except for last few lines>

File "/tmp/test/src/lib/_regex_core.py", line 2024, in optimise
    subpattern = subpattern.optimise(info)
  File "/tmp/test/src/lib/_regex_core.py", line 1552, in optimise
    branches = [_Branch(branches)]
RuntimeError: maximum recursion depth exceeded
History
Date User Action Args
2010-10-31 05:27:51jacquessetrecipients: + jacques, loewis, georg.brandl, collinwinter, gregory.p.smith, jimjjewett, sjmachin, amaury.forgeotdarc, pitrou, nneonneo, giampaolo.rodola, rsc, timehorse, mark, vbr, ezio.melotti, mrabarnett, jaylogan, akitada, moreati, r.david.murray, jhalcrow
2010-10-31 05:27:49jacquessetmessageid: <1288502869.34.0.474946634924.issue2636@psf.upfronthosting.co.za>
2010-10-31 05:27:47jacqueslinkissue2636 messages
2010-10-31 05:27:43jacquescreate