diff options
author | Hugo van der Sanden <hv@crypt.org> | 2002-11-03 16:41:24 +0000 |
---|---|---|
committer | hv <hv@crypt.org> | 2002-11-07 11:33:38 +0000 |
commit | e9f19e3c03f1d62dc32ee20c3f9cd088c9618f14 (patch) | |
tree | 074318b65e31ea0e26364ff00d9c2dcd871934a9 /t | |
parent | 3d40713cb3f43f5a6bd87317708c170c5a6a2304 (diff) | |
download | perl-e9f19e3c03f1d62dc32ee20c3f9cd088c9618f14.tar.gz |
Re: [perl #17605] strange behaviour (difference between perl 5.6 and perl 5.8.0) in the regexp
Message-Id: <200211031641.gA3GfOm08609@crypt.compulink.co.uk>
p4raw-id: //depot/perl@18118
Diffstat (limited to 't')
-rwxr-xr-x | t/op/closure.t | 9 | ||||
-rwxr-xr-x | t/op/sub_lval.t | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/t/op/closure.t b/t/op/closure.t index d93292b925..d51d3be62b 100755 --- a/t/op/closure.t +++ b/t/op/closure.t @@ -13,7 +13,7 @@ BEGIN { use Config; -print "1..173\n"; +print "1..174\n"; my $test = 1; sub test (&) { @@ -527,3 +527,10 @@ sub { }->(); test {1}; +# [perl #17605] found that an empty block called in scalar context +# can lead to stack corruption +{ + my $x = "foooobar"; + $x =~ s/o//eg; + test { $x eq 'fbar' } +} diff --git a/t/op/sub_lval.t b/t/op/sub_lval.t index 308269eee9..a17c3c62c5 100755 --- a/t/op/sub_lval.t +++ b/t/op/sub_lval.t @@ -251,7 +251,7 @@ eval <<'EOE' or $_ = $@; EOE print "# '$_'.\nnot " - unless /Empty array returned from lvalue subroutine in scalar context/; + unless /Can't return undef from lvalue subroutine/; print "ok 31\n"; sub lv10 : lvalue {} @@ -274,7 +274,7 @@ eval <<'EOE' or $_ = $@; EOE print "# '$_'.\nnot " - unless /Can\'t return a readonly value from lvalue subroutine/; + unless /Can't return undef from lvalue subroutine/; print "ok 33\n"; $_ = undef; |