MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0005537 | CMake | public | 2007-08-19 01:58 | 2008-10-01 17:05 | |
Reporter | Brandon Van Every | ||||
Assigned To | Bill Hoffman | ||||
Priority | normal | Severity | crash | Reproducibility | always |
Status | closed | Resolution | won't fix | ||
Platform | OS | OS Version | |||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0005537: REGEX MATCH and MATCHALL can be pathologically slow | ||||
Description | STRING(REGEX MATCH ...) and STRING(REGEX MATCHALL ...) are pathologically slow when given regexes of the form "([a-z]+ *)+\r?\n" even for tiny input streams, such as 30 characters. This pattern is used to detect a line containing a whitespace separated list of words, which is extremely important when parsing files. With larger files, the regex can be so slow that CMake appears to hang indefinitely. Even a 3GHz PC with 1GB RAM can be brought to its knees. More generally, patterns of the form "([^a]+a*)+a" exhibit the problem. A workaround is to express the pattern as "[^a]+(a+[^a]+)*a*". A .zip file containing a reproducer script and a sample input file is attached. | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | slow.zip (1,237) 2007-08-19 01:58 https://public.kitware.com/Bug/file/1114/slow.zip | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2007-08-19 01:58 | Brandon Van Every | New Issue | |||
2007-08-19 01:58 | Brandon Van Every | File Added: slow.zip | |||
2007-12-17 17:56 | Bill Hoffman | Status | new => assigned | ||
2007-12-17 17:56 | Bill Hoffman | Assigned To | => Bill Hoffman | ||
2007-12-31 04:46 | Brandon Van Every | Note Added: 0010034 | |||
2008-10-01 17:05 | Bill Hoffman | Status | assigned => closed | ||
2008-10-01 17:05 | Bill Hoffman | Resolution | open => won't fix |
Notes | |||||
|
|||||
|
|