Issue 9669: regexp: zero-width matches in MIN_UNTIL (original) (raw)
Issue9669
This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/53878
classification
Title: | regexp: zero-width matches in MIN_UNTIL | ||
---|---|---|---|
Type: | crash | Stage: | resolved |
Components: | Extension Modules, Regular Expressions | Versions: | Python 3.2, Python 3.3, Python 3.4, Python 2.7 |
process
Status: | closed | Resolution: | fixed |
---|---|---|---|
Dependencies: | Superseder: | ||
Assigned To: | serhiy.storchaka | Nosy List: | arigo, ezio.melotti, mrabarnett, pitrou, python-dev, serhiy.storchaka |
Priority: | normal | Keywords: | patch |
Created on 2010-08-24 13:12 by arigo, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Files | |||
---|---|---|---|
File name | Uploaded | Description | Edit |
empty_minuntil.py | arigo,2010-08-24 13:12 | Instantaneous infinite memory leaker | |
issue9669.patch | mrabarnett,2013-01-15 21:08 |
Messages (5) | ||
---|---|---|
msg114785 - (view) | Author: Armin Rigo (arigo) * ![]() |
Date: 2010-08-24 13:12 |
The attached example shows a case where the '_sre' module goes into an instantaneous infinite memory leak. The bug (and probably the fix too) is related to empty matches in the MIN_UNTIL operator ("+?", "*?"). It looks very similar to the bug and fix already checked in about the MAX_UNTIL operator ("+", "*"). | ||
msg180051 - (view) | Author: Matthew Barnett (mrabarnett) * ![]() |
Date: 2013-01-15 21:08 |
I've attached my attempt at a patch. | ||
msg180519 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2013-01-24 11:32 |
Can you please provide the tests? | ||
msg182237 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2013-02-16 19:28 |
New changeset dc8a11c16021 by Serhiy Storchaka in branch '2.7': Issue #9669: Protect re against infinite loops on zero-width matching in http://hg.python.org/cpython/rev/dc8a11c16021 New changeset d40afd489b6a by Serhiy Storchaka in branch '3.2': Issue #9669: Protect re against infinite loops on zero-width matching in http://hg.python.org/cpython/rev/d40afd489b6a New changeset 8f9b628593db by Serhiy Storchaka in branch '3.3': Issue #9669: Protect re against infinite loops on zero-width matching in http://hg.python.org/cpython/rev/8f9b628593db New changeset aa17a0dab86a by Serhiy Storchaka in branch 'default': Issue #9669: Protect re against infinite loops on zero-width matching in http://hg.python.org/cpython/rev/aa17a0dab86a | ||
msg182243 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2013-02-16 21:58 |
Committed with a test. Thank you, Matthew. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:05 | admin | set | github: 53878 |
2013-02-16 21:59:22 | serhiy.storchaka | set | status: open -> closedassignee: serhiy.storchakaresolution: fixedstage: patch review -> resolved |
2013-02-16 21:58:55 | serhiy.storchaka | set | messages: + |
2013-02-16 19:28:50 | python-dev | set | nosy: + python-devmessages: + |
2013-02-05 17:31:08 | serhiy.storchaka | link | issue12177 superseder |
2013-01-24 11:32:05 | serhiy.storchaka | set | nosy: + serhiy.storchakamessages: + |
2013-01-15 21:46:48 | serhiy.storchaka | set | stage: needs patch -> patch review |
2013-01-15 21:08:26 | mrabarnett | set | files: + issue9669.patchkeywords: + patchmessages: + |
2013-01-15 19:27:24 | serhiy.storchaka | set | components: + Regular Expressions |
2013-01-15 19:26:56 | serhiy.storchaka | set | stage: needs patchversions: + Python 3.2, Python 3.3, Python 3.4 |
2010-11-01 15:17:20 | ezio.melotti | set | nosy: + mrabarnett |
2010-08-27 18:46:24 | terry.reedy | set | nosy: + pitrou, ezio.melotti |
2010-08-24 13:12:03 | arigo | create |