Skip to content

Commit 0d8dfc4

Browse files
committed
updated for version 7.4.008
Problem: New regexp engine can't be interrupted. Solution: Check for CTRL-C pressed. (Yasuhiro Matsumoto)
1 parent 320b379 commit 0d8dfc4

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

src/regexp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4311,8 +4311,8 @@ regmatch(scan)
43114311
*/
43124312
for (;;)
43134313
{
4314-
/* Some patterns may cause a long time to match, even though they are not
4315-
* illegal. E.g., "\([a-z]\+\)\+Q". Allow breaking them with CTRL-C. */
4314+
/* Some patterns may take a long time to match, e.g., "\([a-z]\+\)\+Q".
4315+
* Allow interrupting them with CTRL-C. */
43164316
fast_breakcheck();
43174317

43184318
#ifdef DEBUG

src/regexp_nfa.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5089,6 +5089,12 @@ nfa_regmatch(prog, start, submatch, m)
50895089
return FALSE;
50905090
}
50915091
#endif
5092+
/* Some patterns may take a long time to match, especially when using
5093+
* recursive_regmatch(). Allow interrupting them with CTRL-C. */
5094+
fast_breakcheck();
5095+
if (got_int)
5096+
return FALSE;
5097+
50925098
nfa_match = FALSE;
50935099

50945100
/* Allocate memory for the lists of nodes. */

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,8 @@ static char *(features[]) =
727727

728728
static int included_patches[] =
729729
{ /* Add new patch number below this line */
730+
/**/
731+
8,
730732
/**/
731733
7,
732734
/**/

0 commit comments

Comments
 (0)