summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2016-03-02 22:10:58 -0700
committerKarl Williamson <khw@cpan.org>2016-03-03 09:44:39 -0700
commitd8387e4d222a2b5468047286d33a8ad9dd67a636 (patch)
tree9f80c4a369c0cff24661056cc7cda0c9c37fc833 /t
parent39eb7305b21af40d48ea23a892ee64a72c37418c (diff)
downloadperl-d8387e4d222a2b5468047286d33a8ad9dd67a636.tar.gz
Reinstate "PATCH: {perl #127582] Over eager warning for /[.foo.]/""
This reverts commit ab9a4aa72166b26d6c3556107c19ba08ee956a88 which itself reverted commit a9149dfda17b511d34bb2af869948b677be52fbc, thus reinstating the original. But this new commit also adds a check to avoid going off the end of a buffer, the absence of which was the cause for the failure of the original commit with address sanitizer.
Diffstat (limited to 't')
-rw-r--r--t/re/reg_mesg.t11
1 files changed, 2 insertions, 9 deletions
diff --git a/t/re/reg_mesg.t b/t/re/reg_mesg.t
index 7509f4136f..2d7bd85e06 100644
--- a/t/re/reg_mesg.t
+++ b/t/re/reg_mesg.t
@@ -99,8 +99,6 @@ my $tab_hex = sprintf "%02X", ord("\t");
my @death =
(
'/[[=foo=]]/' => 'POSIX syntax [= =] is reserved for future extensions {#} m/[[=foo=]{#}]/',
- '/[[=a]=]]/' => 'POSIX syntax [= =] is reserved for future extensions {#} m/[[=a]=]{#}]/',
- '/[[.a].]]/' => 'POSIX syntax [. .] is reserved for future extensions {#} m/[[.a].]{#}]/',
'/(?<= .*)/' => 'Variable length lookbehind not implemented in regex m/(?<= .*)/',
@@ -206,6 +204,8 @@ my @death =
'/(?[[[:w:]]])/' => "Syntax error in (?[...]) in regex m/(?[[[:w:]]])/",
'/(?[[:w:]])/' => "",
'/[][[:alpha:]]' => "", # [perl #127581]
+ '/([.].*)[.]/' => "", # [perl #127582]
+ '/[.].*[.]/' => "", # [perl #127604]
'/(?[a])/' => 'Unexpected character {#} m/(?[a{#}])/',
'/(?[ + \t ])/' => 'Unexpected binary operator \'+\' with no preceding operand {#} m/(?[ +{#} \t ])/',
'/(?[ \cK - ( + \t ) ])/' => 'Unexpected binary operator \'+\' with no preceding operand {#} m/(?[ \cK - ( +{#} \t ) ])/',
@@ -352,7 +352,6 @@ my @death_only_under_strict = (
# These need the character 'ネ' as a marker for mark_as_utf8()
my @death_utf8 = mark_as_utf8(
- '/ネ[[=ネ=]]ネ/' => 'POSIX syntax [= =] is reserved for future extensions {#} m/ネ[[=ネ=]{#}]ネ/',
'/ネ(?<= .*)/' => 'Variable length lookbehind not implemented in regex m/ネ(?<= .*)/',
'/(?<= ネ{1000})/' => 'Lookbehind longer than 255 not implemented in regex m/(?<= ネ{1000})/',
@@ -401,10 +400,6 @@ my @death_utf8 = mark_as_utf8(
'/ネ\o{ネ/' => 'Missing right brace on \o{ {#} m/ネ\o{{#}ネ/',
'/ネ[[:ネ:]]ネ/' => "",
- '/ネ[[=ネ=]]ネ/' => 'POSIX syntax [= =] is reserved for future extensions {#} m/ネ[[=ネ=]{#}]ネ/',
-
- '/ネ[[.ネ.]]ネ/' => 'POSIX syntax [. .] is reserved for future extensions {#} m/ネ[[.ネ.]{#}]ネ/',
-
'/[ネ-a]ネ/' => 'Invalid [] range "ネ-a" {#} m/[ネ-a{#}]ネ/',
'/ネ\p{}ネ/' => 'Empty \p{} {#} m/ネ\p{{#}}ネ/',
@@ -490,8 +485,6 @@ my @warning = (
'/[:alpha:]\x{100}/' => 'POSIX syntax [: :] belongs inside character classes {#} m/[:alpha:]{#}\x{100}/',
'/[:zog:]\x{100}/' => 'POSIX syntax [: :] belongs inside character classes (but this one isn\'t fully valid) {#} m/[:zog:]{#}\x{100}/',
'/[.zog.]\x{100}/' => 'POSIX syntax [. .] belongs inside character classes (but this one isn\'t implemented) {#} m/[.zog.]{#}\x{100}/',
- '/[.z#g.]\x{100}/x' => "", # Runs into a comment
- '/[.z\#g.]\x{100}/x' => 'POSIX syntax [. .] belongs inside character classes (but this one isn\'t implemented) {#} m/[.z\#g.]{#}\x{100}/',
'/[a-b]/' => "",
'/(?c)\x{100}/' => 'Useless (?c) - use /gc modifier {#} m/(?c{#})\x{100}/',
'/(?-c)\x{100}/' => 'Useless (?-c) - don\'t use /gc modifier {#} m/(?-c{#})\x{100}/',