diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-03-11 09:18:25 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-03-11 09:18:25 +0000 |
commit | 87569c6da19c98dc8db22ce673f8dbad79d7e442 (patch) | |
tree | 531370100a6aa6d56fd2758a1464e935da69affb /t | |
parent | 9769094fedff9949aa6f6af210fc4a5ce20fc51d (diff) | |
download | perl-87569c6da19c98dc8db22ce673f8dbad79d7e442.tar.gz |
Try to handle hitting the heap/data limit in small systems.
(One can simulate this with e.g. 32MB or 64MB datasize,
use your shell's ulimit/limit/limits command.)
p4raw-id: //depot/perl@18914
Diffstat (limited to 't')
-rwxr-xr-x | t/op/recurse.t | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/t/op/recurse.t b/t/op/recurse.t index 9d0064068b..af875127cb 100755 --- a/t/op/recurse.t +++ b/t/op/recurse.t @@ -113,8 +113,19 @@ is(takeuchi($x, $y, $z), $z + 1, "takeuchi($x, $y, $z) == $z + 1"); } # check ok for recursion depth > 65536 -is(runperl( - nolib => 1, - prog => q{$d=0; $e=1; sub c { ++$d; if ($d > 66000) { $e=0 } else { c(); c() unless $d % 32768 } --$d } c(); exit $e}, -), '', "64K deep recursion - no output expected"); -is($?, 0, "64K deep recursion - no coredump expected"); +{ + my $r; + eval { + $r = runperl( + nolib => 1, + stderr => 1, + prog => q{$d=0; $e=1; sub c { ++$d; if ($d > 66000) { $e=0 } else { c(); c() unless $d % 32768 } --$d } c(); exit $e}); + }; + SKIP: { + skip("Out of memory -- increase your data/heap?", 2) + if $r =~ /Out of memory!/; + is($r, '', "64K deep recursion - no output expected"); + is($?, 0, "64K deep recursion - no coredump expected"); + } +} + |