my $skip_mode_checks =
$^O eq 'cygwin' && $ENV{CYGWIN} !~ /ntsec/;
-plan tests => 49;
+plan tests => 51;
if (($^O eq 'MSWin32') || ($^O eq 'NetWare')) {
ok(-d 'tmp1', "rename on directories working");
+{
+ # Change 26011: Re: A surprising segfault
+ # to make sure only that these obfuscated sentences will not crash.
+
+ map chmod(+()), ('')x68;
+ ok(1, "extend sp in pp_chmod");
+
+ map chown(+()), ('')x68;
+ ok(1, "extend sp in pp_chown");
+}
+
# need to remove 'tmp' if rename() in test 28 failed!
END { rmdir 'tmp1'; rmdir 'tmp'; 1 while unlink "Iofs.tmp"; }
eval 'use Errno';
die $@ if $@ and !$ENV{PERL_CORE_MINITEST};
-print "1..19\n";
+print "1..21\n";
my $foo = 'STDOUT';
print $foo "ok 1\n";
print "not " if ($! != &Errno::EBADF);
print "ok 19\n";
}
+
+{
+ # Change 26009: pp_print didn't extend the stack
+ # before pushing its return value
+ # to make sure only that these obfuscated sentences will not crash.
+
+ map print(reverse), ('')x68;
+ print "ok 20\n";
+
+ map print(+()), ('')x68;
+ print "ok 21\n";
+}
require './test.pl';
}
-plan tests => 137;
+plan tests => 139;
$_ = 'abc';
$c = do foo();
is($asc, "perl", "chopped ascii NUL");
is($utf, "perl", "chopped utf8 NUL");
}
+
+{
+ # Change 26011: Re: A surprising segfault
+ # to make sure only that these obfuscated sentences will not crash.
+
+ map chop(+()), ('')x68;
+ ok(1, "extend sp in pp_chop");
+
+ map chomp(+()), ('')x68;
+ ok(1, "extend sp in pp_chomp");
+}
sort { while(1) {} } @a;
sort { while(1) { last; } } @a;
sort { while(0) { last; } } @a;
+
+ # Change 26011: Re: A surprising segfault
+ map scalar(sort(+())), ('')x68;
}
sub Backwards { $a lt $b ? 1 : $a gt $b ? -1 : 0 }