[Python-bugs-list] [Bug #110866] re group self-reference weird behavior (PR#2)

noreply@sourceforge.net noreply@sourceforge.net
Wed, 9 Aug 2000 02:27:41 -0700


Bug #110866, was updated on 2000-Aug-01 14:41
Here is a current snapshot of the bug.

Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: 3rd Party
Priority: 5
Summary: re group self-reference weird behavior (PR#2)

Details: Jitterbug-Id: 2
Submitted-By: guido@python.org
Date: Mon, 12 Jul 1999 15:03:24 -0400 (EDT)
Version: 1.5.2
OS: Unix, Windows


Try the following:

import re
re.search("((.)\\1+)","a")

This isn't proper syntax (you shouldn't reference a group
inside itself), but it seems to hang -- in fact it takes
several minutes to execute.

Possibly it runs out of some resource on its path to infinite
recursion and then backtracks?


====================================================================
Audit trail:
Mon Jul 12 15:33:07 1999	guido	moved from incoming to open
Mon Jul 12 19:02:35 1999	guido	changed notes
Thu Jul 13 20:28:48 2000	fdrake	changed notes
Thu Jul 13 20:28:48 2000	fdrake	changed notification
Thu Jul 13 20:28:48 2000	fdrake	moved from open to 3rdpartybug

Follow-Ups:

Date: 2000-Aug-01 14:41
By: none

Comment:
AMK: pcre bug that's been fixed in more recent releases, but that's no longer
relevant with SRE in the picture.
-------------------------------------------------------

Date: 2000-Aug-09 02:27
By: effbot

Comment:
on the other hand, SRE says "nothing to repeat" -- which isn't really what it should do.  Looks like the width calculation messes up on GROUPREF's...

I've reassigned it to myself!
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110866&group_id=5470