summaryrefslogtreecommitdiff
path: root/t/re/pat_advanced.t
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-04-15 15:08:05 -0600
committerKarl Williamson <khw@cpan.org>2019-04-15 15:13:49 -0600
commit8c9c2723eb99e8ecd19594798071d92de79fa67c (patch)
tree251f8359c0b0022b7bf5c9cbd30fe4aa3328708a /t/re/pat_advanced.t
parent11b48e7688e81ca14328a2d959770629efa83cde (diff)
downloadperl-8c9c2723eb99e8ecd19594798071d92de79fa67c.tar.gz
PATCH: [perl #134034] Assert fail in pattern match
This turned out to be a general problem in regexec.c. The function regtry() can change the position we are looking at in the target string. In particular it can point to just past the end of the string. Previous to this commit, we were assuming that the returned string contained valid data in the returned position, and in many places we assumed that it was before the end. This commit fixes that in a bunch of places.
Diffstat (limited to 't/re/pat_advanced.t')
-rw-r--r--t/re/pat_advanced.t5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/re/pat_advanced.t b/t/re/pat_advanced.t
index 290dc244c2..b4f32eec04 100644
--- a/t/re/pat_advanced.t
+++ b/t/re/pat_advanced.t
@@ -2519,6 +2519,11 @@ EOF
"Assertion failure with single character wildcard");
}
+ { # [perl #134034] Previously assertion failure
+ fresh_perl_is('use utf8; q!Ȧिम한글💣΢ყაოსაა!=~/(?li)\b{wb}\B(*COMMIT)0/;',
+ "", {}, "*COMMIT caused positioning beyond EOS");
+ }
+
# !!! NOTE that tests that aren't at all likely to crash perl should go
# a ways above, above these last ones. There's a comment there that, like