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.
Created on 2012年06月15日 10:41 by moriyoshi, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| x.py | moriyoshi, 2012年06月15日 10:41 | |||
| Messages (5) | |||
|---|---|---|---|
| msg162883 - (view) | Author: Moriyoshi Koizumi (moriyoshi) | Date: 2012年06月15日 10:41 | |
A peculiar pair of a regexp and a target string causes the runtime into an infinite loop. The same expression works with Perl. |
|||
| msg162896 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2012年06月15日 12:55 | |
This is not infinite loop. This is O(2**len(prefix_before_first_quote)) computation. Measure times of matching for "INSER(`id`...", "INSERT(`id`...", "INSERT (`id`...", "INSERT I(`id`...", etc. Better use r'''(?:[^`';]+|'(?:''|[^'])*'|`(?:``|[^`])*`)+;''' regexp. |
|||
| msg164280 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2012年06月28日 17:13 | |
I think it's a bug. The issue can be closed. |
|||
| msg164281 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2012年06月28日 17:15 | |
I think it's *not* a bug. The issue can be closed. |
|||
| msg164283 - (view) | Author: Matthew Barnett (mrabarnett) * (Python triager) | Date: 2012年06月28日 17:36 | |
It's not a bug, it's a pathological regex (i.e. it causes catastrophic backtracking). It also works correctly in the "regex" module. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:31 | admin | set | github: 59282 |
| 2012年08月05日 10:31:46 | serhiy.storchaka | set | status: open -> closed resolution: not a bug |
| 2012年06月28日 17:36:45 | mrabarnett | set | messages: + msg164283 |
| 2012年06月28日 17:15:10 | serhiy.storchaka | set | messages: + msg164281 |
| 2012年06月28日 17:13:51 | serhiy.storchaka | set | messages: + msg164280 |
| 2012年06月15日 12:55:05 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg162896 |
| 2012年06月15日 10:41:09 | moriyoshi | create | |