This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
allow wrap-around of PL_cop_seqmax
authorDavid Mitchell <davem@iabyn.com>
Sun, 6 Feb 2011 17:31:39 +0000 (17:31 +0000)
committerDavid Mitchell <davem@iabyn.com>
Sun, 6 Feb 2011 18:57:16 +0000 (18:57 +0000)
commit6012dc8015d0c5599f09bcca302ae714d023aced
tree877cd51015817479ffc1f21de2a3ec825385a3a4
parent0d311cdbe540a08e243ac533c7bcdb73529352db
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].
op.c
pad.c