I've already tracked this down, fixed it, and submitted a patch to the author. But I thought this could be a fun practice problem for other people to look at.
On Perl 5.8 (I haven't tried it in 5.10), the following script segfaults:
#! /usr/bin/perl
use strict;
use warnings;
use Template;
my $template = Template->new({});
my $text = "[% SET content='" . ("stuff "x20_000) . "' %]";
$template->process(\$text, {});
print "Processed\n";
What Perl bug is this tripping over? How could Template Toolkit be fixed to not trigger the segfault?