summaryrefslogtreecommitdiff
path: root/MANIFEST
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-03-06 12:32:58 -0700
committerKarl Williamson <khw@cpan.org>2018-03-06 14:37:46 -0700
commitfb7e725522eb400ba57f680cea29799ad5c8e4ac (patch)
treee7834a0080d74cd24da268e4921731e424598295 /MANIFEST
parente1168c111a3dbbf8383f433d611b13168096d280 (diff)
downloadperl-fb7e725522eb400ba57f680cea29799ad5c8e4ac.tar.gz
PATCH: [perl #132163] regex assertion failure
The original test case in this ticket has already been fixed; but modifying it slightly showed some other issues that are now fixed by this commit. The deepest problem is that this code in some paths creates a string to parse instead of the original pattern. And in some cases, it's not even the original pattern, but something that had already been created to parse instead of the pattern. Any messages that are raised should be output in terms of the original. regcomp.c already has the infrastructure to handle the case where a message is raised during parsing of a constructed string, but it can't handle a 2nd level constructed string. That was what led to the segfault in the original ticket. Unrelated fixes caused the original ticket to no longer be applicable, and so this fix adds tests for things still would cause a problem. The method chosen here is to just make sure that the string constructed here to parse is error free, so no messages will be raised. Instead it does the error checking as it constructs the string, so if what is being parsed to construct a new string is an already constructed one, the existing infrastructure handles outputting the message relative to the original pattern. Since what is being parsed is a series of hex numbers, it's easy to find out what their values are: just accumulate a total, shifting 4 bits each time through the loop. A side benefit is that this fixes some unreported bugs dealing with an input code point that overflows. Prior to this patch, it would error ungracefully.
Diffstat (limited to 'MANIFEST')
-rw-r--r--MANIFEST1
1 files changed, 1 insertions, 0 deletions
diff --git a/MANIFEST b/MANIFEST
index b41aa29c96..c11c8f556b 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -5485,6 +5485,7 @@ t/lib/croak/pp Test croak calls from pp.c
t/lib/croak/pp_ctl Test croak calls from pp_ctl.c
t/lib/croak/pp_hot Test croak calls from pp_hot.c
t/lib/croak/pp_sys Test croak calls from pp_sys.c
+t/lib/croak/regcomp Test croak calls from regcomp.c
t/lib/croak/toke Test croak calls from toke.c
t/lib/croak/toke_l1 Test croak calls from toke.c; file is not UTF-8 encoded
t/lib/cygwin.t Builtin cygwin function tests