This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8_heavy: Guard against infinite recursion
authorKarl Williamson <public@khwilliamson.com>
Sun, 14 Nov 2010 19:11:12 +0000 (12:11 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 22 Nov 2010 21:32:53 +0000 (13:32 -0800)
If things aren't just so, it could be that utf8_heavy calls something
which requires a pattern, such as split or just a pattern match that
ends up calling utf8_heavy again, ad infinitum.  When this happens,
memory gets eaten up and the machine grinds to a halt, likely requiring a
manual forced reboot.

To prevent this undesirable situation, utf8_heavy now stacks all its
calls in progress, and if any is a repeat, panics.


No differences found