Skip to content

Commit 8df928d

Browse files
committed
Call PERL_ASYNC_CHECK when we backtrack in the regex engine
1 parent 51f69a2 commit 8df928d

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

regexec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8426,6 +8426,7 @@ NULL
84268426
yes_state = st->u.yes.prev_yes_state;
84278427

84288428
state_num = st->resume_state + 1; /* failure = success + 1 */
8429+
PERL_ASYNC_CHECK();
84298430
goto reenter_switch;
84308431
}
84318432
result = 0;

t/re/pat.t

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ BEGIN {
2323
skip_all_without_unicode_tables();
2424
}
2525

26-
plan tests => 789; # Update this when adding/deleting tests.
26+
plan tests => 790; # Update this when adding/deleting tests.
2727

2828
run_tests() unless caller;
2929

@@ -1758,6 +1758,16 @@ EOP
17581758
fresh_perl_is($code, $expect, {}, "$bug - $test_name" );
17591759
}
17601760
}
1761+
{
1762+
fresh_perl_is('
1763+
BEGIN{require q(test.pl);}
1764+
watchdog(3);
1765+
$SIG{ALRM} = sub {print "Timeout\n"; exit(1)};
1766+
alarm 1;
1767+
$_ = "a" x 1000 . "b" x 1000 . "c" x 1000;
1768+
/.*a.*b.*c.*[de]/;
1769+
',"Timeout",{},"Test Perl 73464")
1770+
}
17611771
} # End of sub run_tests
17621772

17631773
1;

0 commit comments

Comments
 (0)