summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-03-14 03:50:38 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-14 03:50:38 +0000
commit5cfc78421f161e223f47fcc0aa3d4d3fa5f3976e (patch)
tree2ef2cd4539bb6af01a562976c217e5ddfe2089a4 /t
parentc6a6ba88b188e56556e838218408788ec13954d4 (diff)
downloadperl-5cfc78421f161e223f47fcc0aa3d4d3fa5f3976e.tar.gz
Integrate changes #9137,9138,9142 from maintperl into mainline.
fix leak in pregcomp() when RE fails to compile (e.g. m/\\/) remove squelch controls for "Scalars leaked" messages in most places (these are now cured) fix another memory leak reported by purify (tie callbacks that croak can leak when wiping out magic) p4raw-link: @9142 on //depot/maint-5.6/perl: 26972843796e21c404c9d13ec5ee86e7b952a2bd p4raw-link: @9138 on //depot/maint-5.6/perl: ad7f1144250940f9ca43bac32708ec5e718b30ff p4raw-link: @9137 on //depot/maint-5.6/perl: 1f35595ecca168b4f66e3399344799fdbd496d17 p4raw-id: //depot/perl@9144 p4raw-integrated: from //depot/maint-5.6/perl@9143 'copy in' t/pragma/strict-vars (@7318..) t/pragma/warn/regcomp (@7887..) t/op/regexp.t (@8551..) t/op/lex_assign.t (@8987..) 'merge in' t/op/local.t (@5902..) t/pragma/warn/op (@7846..) t/pragma/warnings.t (@7895..) t/comp/proto.t (@8173..) t/pragma/warn/toke (@8570..) regcomp.c (@8777..) scope.c (@8855..) t/op/pat.t (@9076..)
Diffstat (limited to 't')
-rwxr-xr-xt/comp/proto.t3
-rwxr-xr-xt/op/lex_assign.t1
-rwxr-xr-xt/op/local.t3
-rwxr-xr-xt/op/pat.t3
-rwxr-xr-xt/op/regexp.t3
-rw-r--r--t/pragma/strict-vars6
-rw-r--r--t/pragma/warn/op2
-rw-r--r--t/pragma/warn/regcomp6
-rw-r--r--t/pragma/warn/toke46
-rw-r--r--t/pragma/warnings.t1
10 files changed, 25 insertions, 49 deletions
diff --git a/t/comp/proto.t b/t/comp/proto.t
index 22428570a7..5fce52685a 100755
--- a/t/comp/proto.t
+++ b/t/comp/proto.t
@@ -9,9 +9,6 @@
# we should test as many as we can.
#
-# XXX known to leak scalars
-$ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
-
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
diff --git a/t/op/lex_assign.t b/t/op/lex_assign.t
index ee74d93478..d761f73ce7 100755
--- a/t/op/lex_assign.t
+++ b/t/op/lex_assign.t
@@ -4,7 +4,6 @@ BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
}
-$ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
umask 0;
$xref = \ "";
diff --git a/t/op/local.t b/t/op/local.t
index 781afa5b35..9f977b2cd4 100755
--- a/t/op/local.t
+++ b/t/op/local.t
@@ -2,9 +2,6 @@
print "1..71\n";
-# XXX known to leak scalars
-$ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
-
sub foo {
local($a, $b) = @_;
local($c, $d);
diff --git a/t/op/pat.t b/t/op/pat.t
index a82da60e72..293e74869e 100755
--- a/t/op/pat.t
+++ b/t/op/pat.t
@@ -12,9 +12,6 @@ BEGIN {
}
eval 'use Config'; # Defaults assumed if this fails
-# XXX known to leak scalars
-$ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
-
$x = "abc\ndef\n";
if ($x =~ /^abc/) {print "ok 1\n";} else {print "not ok 1\n";}
diff --git a/t/op/regexp.t b/t/op/regexp.t
index 7fbfc97342..4a4d42fd98 100755
--- a/t/op/regexp.t
+++ b/t/op/regexp.t
@@ -1,8 +1,5 @@
#!./perl
-# XXX known to leak scalars
-$ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
-
# The tests are in a separate file 't/op/re_tests'.
# Each line in that file is a separate test.
# There are five columns, separated by tabs.
diff --git a/t/pragma/strict-vars b/t/pragma/strict-vars
index 5ba579d969..40b55572b8 100644
--- a/t/pragma/strict-vars
+++ b/t/pragma/strict-vars
@@ -151,8 +151,6 @@ $d = 1;$i = 1;$n = 1;
$e = 1;$j = 1;$o = 1;
$p = 0b12;
--FILE--
-# known scalar leak
-BEGIN { $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3; }
use abc;
EXPECT
Global symbol "$f" requires explicit package name at abc.pm line 3.
@@ -171,8 +169,8 @@ Global symbol "$o" requires explicit package name at abc.pm line 7.
Global symbol "$p" requires explicit package name at abc.pm line 8.
Illegal binary digit '2' at abc.pm line 8, at end of line
abc.pm has too many errors.
-Compilation failed in require at - line 3.
-BEGIN failed--compilation aborted at - line 3.
+Compilation failed in require at - line 1.
+BEGIN failed--compilation aborted at - line 1.
########
# Check scope of pragma with eval
diff --git a/t/pragma/warn/op b/t/pragma/warn/op
index de326f8b0c..f3c0548e57 100644
--- a/t/pragma/warn/op
+++ b/t/pragma/warn/op
@@ -569,7 +569,7 @@ Useless use of a constant in void context at - line 3.
Useless use of a constant in void context at - line 4.
########
# op.c
-BEGIN{ $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3; } # known scalar leak
+#
use warnings 'misc' ;
my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ;
@a =~ /abc/ ;
diff --git a/t/pragma/warn/regcomp b/t/pragma/warn/regcomp
index 59076d5f3b..8b86b5082f 100644
--- a/t/pragma/warn/regcomp
+++ b/t/pragma/warn/regcomp
@@ -50,7 +50,7 @@ EXPECT
Unrecognized escape \m passed through before HERE mark in regex m/a\m << HERE / at - line 4.
########
# regcomp.c [S_regpposixcc S_checkposixcc]
-BEGIN { $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3 }
+#
use warnings 'regexp' ;
$_ = "" ;
/[:alpha:]/;
@@ -66,7 +66,7 @@ POSIX syntax [: :] belongs inside character classes before HERE mark in regex m/
POSIX class [:zog:] unknown before HERE mark in regex m/[[:zog:] << HERE ]/
########
# regcomp.c [S_checkposixcc]
-BEGIN { $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3 }
+#
use warnings 'regexp' ;
$_ = "" ;
/[.zog.]/;
@@ -77,7 +77,7 @@ POSIX syntax [. .] belongs inside character classes before HERE mark in regex m/
POSIX syntax [. .] is reserved for future extensions before HERE mark in regex m/[.zog.] << HERE /
########
# regcomp.c [S_checkposixcc]
-BEGIN { $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3 }
+#
use warnings 'regexp' ;
$_ = "" ;
/[[.zog.]]/;
diff --git a/t/pragma/warn/toke b/t/pragma/warn/toke
index 2c9433bd7d..4924bb2dff 100644
--- a/t/pragma/warn/toke
+++ b/t/pragma/warn/toke
@@ -169,10 +169,6 @@ EXPECT
Semicolon seems to be missing at - line 3.
########
# toke.c
-BEGIN {
- # Scalars leaked: due to syntax errors
- $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
-}
use warnings 'syntax' ;
my $a =+ 2 ;
$a =- 2 ;
@@ -185,25 +181,21 @@ $a =| 2 ;
$a =< 2 ;
$a =/ 2 ;
EXPECT
-Reversed += operator at - line 7.
-Reversed -= operator at - line 8.
-Reversed *= operator at - line 9.
-Reversed %= operator at - line 10.
-Reversed &= operator at - line 11.
-Reversed .= operator at - line 12.
-Reversed ^= operator at - line 13.
-Reversed |= operator at - line 14.
-Reversed <= operator at - line 15.
-syntax error at - line 12, near "=."
-syntax error at - line 13, near "=^"
-syntax error at - line 14, near "=|"
-Unterminated <> operator at - line 15.
-########
-# toke.c
-BEGIN {
- # Scalars leaked: due to syntax errors
- $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
-}
+Reversed += operator at - line 3.
+Reversed -= operator at - line 4.
+Reversed *= operator at - line 5.
+Reversed %= operator at - line 6.
+Reversed &= operator at - line 7.
+Reversed .= operator at - line 8.
+Reversed ^= operator at - line 9.
+Reversed |= operator at - line 10.
+Reversed <= operator at - line 11.
+syntax error at - line 8, near "=."
+syntax error at - line 9, near "=^"
+syntax error at - line 10, near "=|"
+Unterminated <> operator at - line 11.
+########
+# toke.c
no warnings 'syntax' ;
my $a =+ 2 ;
$a =- 2 ;
@@ -216,10 +208,10 @@ $a =| 2 ;
$a =< 2 ;
$a =/ 2 ;
EXPECT
-syntax error at - line 12, near "=."
-syntax error at - line 13, near "=^"
-syntax error at - line 14, near "=|"
-Unterminated <> operator at - line 15.
+syntax error at - line 8, near "=."
+syntax error at - line 9, near "=^"
+syntax error at - line 10, near "=|"
+Unterminated <> operator at - line 11.
########
# toke.c
use warnings 'syntax' ;
diff --git a/t/pragma/warnings.t b/t/pragma/warnings.t
index 872e6e1417..e2c7500582 100644
--- a/t/pragma/warnings.t
+++ b/t/pragma/warnings.t
@@ -5,7 +5,6 @@ BEGIN {
@INC = '../lib';
$ENV{PERL5LIB} = '../lib';
require Config; import Config;
- $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
}
$| = 1;