This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
update size after Renew
authorHugo van der Sanden <hv@crypt.org>
Tue, 28 Feb 2017 11:23:09 +0000 (11:23 +0000)
committerDavid Mitchell <davem@iabyn.com>
Wed, 15 Mar 2017 09:17:08 +0000 (09:17 +0000)
commit00195859c65eccf9425faf45db543a12c7ad3874
treecd04c70326c16ed06553a6608564bd8237b888b6
parentacfc2cc32784cce84bd781bc3822b14406b94db2
update size after Renew

RT #130841

In general code, change this idiom:

    PL_foo_max += size;
    Renew(PL_foo, PL_foo_max, foo_t);

to
    Renew(PL_foo, PL_foo_max + size, foo_t);
    PL_foo_max += size;

so that if Renew dies, PL_foo_max won't be left hanging.
perlio.c
pp_hot.c
pp_sort.c
regcomp.c
scope.c
util.c