This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
svleak.t: Add test for #123198
[perl5.git]
/
regcomp.c
diff --git
a/regcomp.c
b/regcomp.c
index
a62e3e1
..
7ea5d89
100644
(file)
--- a/
regcomp.c
+++ b/
regcomp.c
@@
-3773,7
+3773,7
@@
S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
{
PerlIO_printf(Perl_debug_log,
"%*sstudy_chunk stopparen=%ld recursed_count=%lu depth=%lu recursed_depth=%lu scan=%p last=%p",
{
PerlIO_printf(Perl_debug_log,
"%*sstudy_chunk stopparen=%ld recursed_count=%lu depth=%lu recursed_depth=%lu scan=%p last=%p",
- (
(int)
depth*2), "", (long)stopparen,
+ (
int)(
depth*2), "", (long)stopparen,
(unsigned long)RExC_study_chunk_recursed_count,
(unsigned long)depth, (unsigned long)recursed_depth,
scan,
(unsigned long)RExC_study_chunk_recursed_count,
(unsigned long)depth, (unsigned long)recursed_depth,
scan,
@@
-3792,7
+3792,7
@@
S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
(( j - 1 ) * RExC_study_chunk_recursed_bytes), i)
)
) {
(( j - 1 ) * RExC_study_chunk_recursed_bytes), i)
)
) {
- PerlIO_printf(Perl_debug_log," %d",i);
+ PerlIO_printf(Perl_debug_log," %d",
(int)
i);
break;
}
}
break;
}
}
@@
-4833,8
+4833,11
@@
S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp,
{
/* Fatal warnings may leak the regexp without this: */
SAVEFREESV(RExC_rx_sv);
{
/* Fatal warnings may leak the regexp without this: */
SAVEFREESV(RExC_rx_sv);
- ckWARNreg(RExC_parse,
- "Quantifier unexpected on zero-length expression");
+ Perl_ck_warner(aTHX_ packWARN(WARN_REGEXP),
+ "Quantifier unexpected on zero-length expression "
+ "in regex m/%"UTF8f"/",
+ UTF8fARG(UTF, RExC_end - RExC_precomp,
+ RExC_precomp));
(void)ReREFCNT_inc(RExC_rx_sv);
}
(void)ReREFCNT_inc(RExC_rx_sv);
}
@@
-9101,7
+9104,7
@@
Perl__add_range_to_invlist(pTHX_ SV* invlist, const UV start, const UV end)
/* Add the range from 'start' to 'end' inclusive to the inversion list's
* set. A pointer to the inversion list is returned. This may actually be
* a new list, in which case the passed in one has been destroyed. The
/* Add the range from 'start' to 'end' inclusive to the inversion list's
* set. A pointer to the inversion list is returned. This may actually be
* a new list, in which case the passed in one has been destroyed. The
- * passed
in inversion list can be NULL, in which case a new one is created
+ * passed
-
in inversion list can be NULL, in which case a new one is created
* with just the one range in it */
SV* range_invlist;
* with just the one range in it */
SV* range_invlist;
@@
-10147,7
+10150,7
@@
S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
RExC_recurse_count++;
DEBUG_OPTIMISE_MORE_r(PerlIO_printf(Perl_debug_log,
"%*s%*s Recurse #%"UVuf" to %"IVdf"\n",
RExC_recurse_count++;
DEBUG_OPTIMISE_MORE_r(PerlIO_printf(Perl_debug_log,
"%*s%*s Recurse #%"UVuf" to %"IVdf"\n",
- 22, "| |",
1 + depth * 2
, "",
+ 22, "| |",
(int)(depth * 2 + 1)
, "",
(UV)ARG(ret), (IV)ARG2L(ret)));
}
RExC_seen |= REG_RECURSE_SEEN;
(UV)ARG(ret), (IV)ARG2L(ret)));
}
RExC_seen |= REG_RECURSE_SEEN;
@@
-10420,7
+10423,7
@@
S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
{
DEBUG_OPTIMISE_MORE_r(PerlIO_printf(Perl_debug_log,
"%*s%*s Setting open paren #%"IVdf" to %d\n",
{
DEBUG_OPTIMISE_MORE_r(PerlIO_printf(Perl_debug_log,
"%*s%*s Setting open paren #%"IVdf" to %d\n",
- 22, "| |",
1+2 * depth
, "",
+ 22, "| |",
(int)(depth * 2 + 1)
, "",
(IV)parno, REG_NODE_NUM(ret)));
RExC_open_parens[parno-1]= ret;
}
(IV)parno, REG_NODE_NUM(ret)));
RExC_open_parens[parno-1]= ret;
}
@@
-10510,7
+10513,7
@@
S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
if (!SIZE_ONLY && RExC_seen & REG_RECURSE_SEEN) {
DEBUG_OPTIMISE_MORE_r(PerlIO_printf(Perl_debug_log,
"%*s%*s Setting close paren #%"IVdf" to %d\n",
if (!SIZE_ONLY && RExC_seen & REG_RECURSE_SEEN) {
DEBUG_OPTIMISE_MORE_r(PerlIO_printf(Perl_debug_log,
"%*s%*s Setting close paren #%"IVdf" to %d\n",
- 22, "| |",
1+2 * depth
, "", (IV)parno, REG_NODE_NUM(ender)));
+ 22, "| |",
(int)(depth * 2 + 1)
, "", (IV)parno, REG_NODE_NUM(ender)));
RExC_close_parens[parno-1]= ender;
if (RExC_nestroot == parno)
RExC_nestroot = 0;
RExC_close_parens[parno-1]= ender;
if (RExC_nestroot == parno)
RExC_nestroot = 0;
@@
-14459,8
+14462,9
@@
S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
continue;
}
continue;
}
- /* Here, we have a single value, and <prevvalue> is the beginning of
- * the range, if any; or <value> if not */
+ /* Here, we have a single value this time through the loop, and
+ * <prevvalue> is the beginning of the range, if any; or <value> if
+ * not. */
/* non-Latin1 code point implies unicode semantics. Must be set in
* pass1 so is there for the whole of pass 2 */
/* non-Latin1 code point implies unicode semantics. Must be set in
* pass1 so is there for the whole of pass 2 */
@@
-16500,6
+16504,7
@@
Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
PERL_UNUSED_ARG(o);
PERL_UNUSED_ARG(prog);
PERL_UNUSED_ARG(reginfo);
PERL_UNUSED_ARG(o);
PERL_UNUSED_ARG(prog);
PERL_UNUSED_ARG(reginfo);
+ PERL_UNUSED_ARG(pRExC_state);
#endif /* DEBUGGING */
}
#endif /* DEBUGGING */
}