This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use SSize_t for tmps stack offsets
authorFather Chrysostomos <sprout@cpan.org>
Sun, 25 Aug 2013 01:02:09 +0000 (18:02 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 25 Aug 2013 13:39:28 +0000 (06:39 -0700)
This is a partial fix for #119161.

On 64-bit platforms, I32 is too small to hold offsets into a stack
that can grow larger than I32_MAX.  What happens is the offsets can
wrap so we end up referencing and modifying elements with negative
indices, corrupting memory, and causing crashes.

With this commit, ()=1..1000000000000 stops crashing immediately.
Instead, it gobbles up all your memory first, and then, if your com-
puter still survives, crashes.  The second crash happesn bcause of
a similar bug with the argument stack, which the next commit will
take care of.


No differences found