summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-10-30 20:44:53 +0000
committerSteve Hay <steve.m.hay@googlemail.com>2015-10-30 20:45:05 +0000
commit87a901b702ad4096fac12e78f264d9e7fba9e2f9 (patch)
treec1fa4bb067e7573c1e66baf9720886128812d1d1
parent74f9b2afe040f8bc872b156379421303a3750ea4 (diff)
downloadperl-87a901b702ad4096fac12e78f264d9e7fba9e2f9.tar.gz
PATCH: [perl # 126178] Unterminated /(?i/
(cherry picked from commit 5b9ce45660f01f87f17ed2211a1c01540d903a41)
-rw-r--r--pod/perldiag.pod7
-rw-r--r--regcomp.c4
-rw-r--r--t/re/re_tests3
3 files changed, 11 insertions, 3 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index c827aa64ec..c6e8c1858d 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -5253,6 +5253,13 @@ missing the final closing quote or angle bracket after the name. The
S<<-- HERE> shows whereabouts in the regular expression the problem was
discovered.
+=item Sequence (?... not terminated in regex; marked by S<<-- HERE> in
+m/%s/
+
+(F) There was no matching closing parenthesis for the '('. The
+S<<-- HERE> shows whereabouts in the regular expression the problem was
+discovered.
+
=item Sequence \%s... not terminated in regex; marked by S<<-- HERE> in
m/%s/
diff --git a/regcomp.c b/regcomp.c
index 1af5c1cfd8..ccab8b7cf3 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -9726,9 +9726,7 @@ S_parse_lparen_question_flags(pTHX_ RExC_state_t *pRExC_state)
++RExC_parse;
}
- if (PASS2) {
- STD_PMMOD_FLAGS_PARSE_X_WARN(x_mod_count);
- }
+ vFAIL("Sequence (?... not terminated");
}
/*
diff --git a/t/re/re_tests b/t/re/re_tests
index 8a926aeae8..e9fa90d5ef 100644
--- a/t/re/re_tests
+++ b/t/re/re_tests
@@ -1927,5 +1927,8 @@ A+(*PRUNE)BC(?{}) AAABC y $& AAABC
/(a+){1}+a/ aaa n - - # [perl #125825]
+(?i - c - Sequence (?... not terminated
+(?a-x - c - Sequence (?... not terminated
+
# Keep these lines at the end of the file
# vim: softtabstop=0 noexpandtab