In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/ff36bb50a704e1926451063369ace915b3074f06?hp=2fcbb74a67c62e89b625fc824fcddb7de6519a28>
- Log ----------------------------------------------------------------- commit ff36bb50a704e1926451063369ace915b3074f06 Author: Hugo van der Sanden <[email protected]> Date: Tue Mar 24 07:29:55 2015 +0000 fix signed/unsigned mismatch in (M)EXTEND A large enough allocation request could wrap, causing MEXTEND to decide the stack was already big enough. ----------------------------------------------------------------------- Summary of changes: pp.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pp.h b/pp.h index 003d7af..828b7a2 100644 --- a/pp.h +++ b/pp.h @@ -278,21 +278,21 @@ Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>. } STMT_END /* Same thing, but update mark register too. */ # define MEXTEND(p,n) STMT_START { \ - const int markoff = mark - PL_stack_base; \ + const SSize_t markoff = mark - PL_stack_base; \ sp = stack_grow(sp,p,(SSize_t) (n)); \ mark = PL_stack_base + markoff; \ PERL_UNUSED_VAR(sp); \ } STMT_END #else # define EXTEND(p,n) STMT_START { \ - if (UNLIKELY(PL_stack_max - p < (int)(n))) { \ + if (UNLIKELY(PL_stack_max - p < (SSize_t)(n))) { \ sp = stack_grow(sp,p,(SSize_t) (n)); \ PERL_UNUSED_VAR(sp); \ } } STMT_END /* Same thing, but update mark register too. */ # define MEXTEND(p,n) STMT_START { \ - if (UNLIKELY(PL_stack_max - p < (int)(n))) { \ - const int markoff = mark - PL_stack_base; \ + if (UNLIKELY(PL_stack_max - p < (SSize_t)(n))) { \ + const SSize_t markoff = mark - PL_stack_base; \ sp = stack_grow(sp,p,(SSize_t) (n)); \ mark = PL_stack_base + markoff; \ PERL_UNUSED_VAR(sp); \ -- Perl5 Master Repository
