diff options
author | David Mitchell <davem@iabyn.com> | 2011-02-06 17:31:39 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2011-02-06 18:57:16 +0000 |
commit | 6012dc8015d0c5599f09bcca302ae714d023aced (patch) | |
tree | 877cd51015817479ffc1f21de2a3ec825385a3a4 /op.c | |
parent | 0d311cdbe540a08e243ac533c7bcdb73529352db (diff) | |
download | perl-6012dc8015d0c5599f09bcca302ae714d023aced.tar.gz |
allow wrap-around of PL_cop_seqmax
After a large number of evals, PL_cop_seqmax (a U32) will wrap around
again to zero. Make the code handle this case by:
1) When incrementing PL_cop_seqmax, never allow its value to become
equal to PERL_PADSEQ_INTRO;
2) When testing for COP_SEQ_RANGE_LOW < seq <= COP_SEQ_RANGE_HIGH,
allow for the fact that _HIGH may be lower than _LOW.
This is a final fix for [perl #83364].
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -4356,6 +4356,8 @@ Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *idop, OP *arg) PL_parser->copline = NOLINE; PL_parser->expect = XSTATE; PL_cop_seqmax++; /* Purely for B::*'s benefit */ + if (PL_cop_seqmax == PERL_PADSEQ_INTRO) /* not a legal value */ + PL_cop_seqmax++; #ifdef PERL_MAD if (!PL_madskills) { |