In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/e7cce976d7dd1f4fda1f387d02c6403f43346e9c?hp=354f3e4ea74293dacec2ca84d3762435e9c45701>
- Log ----------------------------------------------------------------- commit e7cce976d7dd1f4fda1f387d02c6403f43346e9c Author: Karl Williamson <[email protected]> Date: Sun Aug 23 21:39:04 2015 -0600 PATCH: [perl #125805] Perl segfaults with a regex_sets error message This fix required an extra test of the return value of a function. ----------------------------------------------------------------------- Summary of changes: pod/perldelta.pod | 2 +- regcomp.c | 1 + t/re/reg_mesg.t | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pod/perldelta.pod b/pod/perldelta.pod index fe6c8e2..395af69 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -338,7 +338,7 @@ files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>. =item * -XXX +C<(?[ () ])> no longer segfaults. [perl #125805] =back diff --git a/regcomp.c b/regcomp.c index 4719d12..4264274 100644 --- a/regcomp.c +++ b/regcomp.c @@ -13925,6 +13925,7 @@ redo_curchar: if (av_tindex(stack) < 0 /* Was empty */ || ((final = av_pop(stack)) == NULL) || ! IS_OPERAND(final) + || SvTYPE(final) != SVt_INVLIST || av_tindex(stack) >= 0) /* More left on stack */ { SvREFCNT_dec(final); diff --git a/t/re/reg_mesg.t b/t/re/reg_mesg.t index 452d982..a058824 100644 --- a/t/re/reg_mesg.t +++ b/t/re/reg_mesg.t @@ -219,6 +219,7 @@ my @death = '/(?[ \x{} ])/' => 'Number with no digits {#} m/(?[ \x{}{#} ])/', '/(?[ \cK + ) ])/' => 'Unexpected \')\' {#} m/(?[ \cK + ){#} ])/', '/(?[ \cK + ])/' => 'Incomplete expression within \'(?[ ])\' {#} m/(?[ \cK + {#}])/', + '/(?[ ( ) ])/' => 'Incomplete expression within \'(?[ ])\' {#} m/(?[ ( ) {#}])/', '/(?[ \p{foo} ])/' => 'Property \'foo\' is unknown {#} m/(?[ \p{foo}{#} ])/', '/(?[ \p{ foo = bar } ])/' => 'Property \'foo = bar\' is unknown {#} m/(?[ \p{ foo = bar }{#} ])/', '/(?[ \8 ])/' => 'Unrecognized escape \8 in character class {#} m/(?[ \8{#} ])/', -- Perl5 Master Repository
