On 2005–07–28, at 08:51, Dominic Dunlop wrote:
On 2005–07–27, at 20:31, John Narron wrote:

perl -e 'my $x = q[if ($h->{ALPHA}->{BETA}->{q{stuff}}) {] . "\n" . q[
stuff($h, @_);] . "\n}\n\n"; $x x= 7238; $x =~ s/stuff/"stuff" .
++$count/eg; eval $x'


Problem confirmed with the above script on Mac OS X. The tipping point for a debugging [EMAIL PROTECTED] with a stack limit of 8192k is $x x= 26197. For a 64-bit perl it's somewhat more than half that; for a production perl 5.8.6, it's much higher -- somewhere between 70 and 80,000.

Another data point: the problem's not specific to eval -- with this variant of the program, which pipes the generated script to a child perl, the child perl blows its stack at almost exactly the same point (21969 vs 21968) as in the original.

./perl -e 'my $x = q[if ($h->{ALPHA}->{BETA}->{q{stuff}}) {] . "\n" . q[
stuff($h, @_);] . "\n}\n\n"; $x x= 26199; $x =~ s/stuff/"stuff" .
++$count/eg;$x .= q(print "done\n";); open P, "|./perl -w" or die "Pipe open failed: !$\n"; print P $x; close P'

--
Dominic Dunlop

Reply via email to