Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_61 on HP-UC 11: pragma/warn/op has leaking scalars #449

Closed
p5pRT opened this issue Aug 27, 1999 · 1 comment
Closed

_61 on HP-UC 11: pragma/warn/op has leaking scalars #449

p5pRT opened this issue Aug 27, 1999 · 1 comment

Comments

@p5pRT
Copy link

p5pRT commented Aug 27, 1999

Migrated from rt.perl.org#1290 (status was 'resolved')

Searchable as RT1290$

@p5pRT
Copy link
Author

p5pRT commented Aug 27, 1999

From okamoto@hpcc577.corp.hp.com


[Please enter your report here]

This is output from make test. If I hand run the test, it runs fine.
The difference between expected and got is the "Scalars leaked" line.

pragma/warning......PROG​:
# op.c
$ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3; # known scal
ar leak
use warning 'unsafe' ;
my $a ; my @​a = () ; my %a = () ; my $b = \@​a ; my $c = \%a ;
@​a =~ /abc/ ;
@​a =~ s/a/b/ ;
@​a =~ tr/a/b/ ;
@​$b =~ /abc/ ;
@​$b =~ s/a/b/ ;
@​$b =~ tr/a/b/ ;
%a =~ /abc/ ;
%a =~ s/a/b/ ;
%a =~ tr/a/b/ ;
%$c =~ /abc/ ;
%$c =~ s/a/b/ ;
%$c =~ tr/a/b/ ;
{
no warning 'unsafe' ;
my $a ; my @​a = () ; my %a = () ; my $b = \@​a ; my $c = \%a ;
@​a =~ /abc/ ;
@​a =~ s/a/b/ ;
@​a =~ tr/a/b/ ;
@​$b =~ /abc/ ;
@​$b =~ s/a/b/ ;
@​$b =~ tr/a/b/ ;
%a =~ /abc/ ;
%a =~ s/a/b/ ;
%a =~ tr/a/b/ ;
%$c =~ /abc/ ;
%$c =~ s/a/b/ ;
%$c =~ tr/a/b/ ;
}
EXPECTED​:
Applying pattern match to @​array will act on scalar(@​array) at - line 5.
Applying substitution to @​array will act on scalar(@​array) at - line 6.
Can't modify private array in substitution at - line 6, near "s/a/b/ ;"
Applying character translation to @​array will act on scalar(@​array) at - line 7.

Applying pattern match to @​array will act on scalar(@​array) at - line 8.
Applying substitution to @​array will act on scalar(@​array) at - line 9.
Applying character translation to @​array will act on scalar(@​array) at - line 10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant