diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-11-17 10:13:10 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-11-17 10:13:44 -0800 |
commit | 867b16b50f413adfdb2addcab33ad1d6e61da9d5 (patch) | |
tree | 58a667582034b7664ec8bb6e3d8c1a0ec1e34234 /Porting/leakfinder.pl | |
parent | 11e375e08d1253bcb8ecf804cd0fa2eb92de7baf (diff) | |
download | perl-867b16b50f413adfdb2addcab33ad1d6e61da9d5.tar.gz |
leakfinder: More exceptions
Diffstat (limited to 'Porting/leakfinder.pl')
-rw-r--r-- | Porting/leakfinder.pl | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/Porting/leakfinder.pl b/Porting/leakfinder.pl index a0b5457810..db93a17bf5 100644 --- a/Porting/leakfinder.pl +++ b/Porting/leakfinder.pl @@ -26,6 +26,7 @@ for(`find .`) { next if /(?:END|CHECK|INIT)\s*\{/; next if /^\s*(?:push|unshift|(?:\@r = )?splice|binmode|sleep)/; next if /\bselect(?:\s*\()[^()]+,/; # 4-arg select hangs + next if /use parent/; my $q = s/[\\']/sprintf "\\%02x", ord $&/gore =~ s/\0/'."\\0".'/grid; $prog = <<end; @@ -51,11 +52,13 @@ end BEGIN { @exceptions = split /^/, <<'end'; +1 while 1; 1 while some_condition_with_side_effects; */ $a{buttons}[2*$a{default_button}] = [$a{buttons}[2*$a{default_button}]]; $aliases{$code_point} = [ $aliases{$code_point} ]; $aliases_maps->[$i] = [ $aliases_maps->[$i] ] $allow ? $hash{$acc} = $allow : push @list, $acc; +/(a*(*MARK:a)b?)(*MARK:x)(*SKIP:a)(?{$count++; push @res,$1})(*FAIL)/g; A rare race condition that would lead to L<sleep|perlfunc/sleep> taking more $args{include_dirs} = [ $args{include_dirs} ] $ARRAY[++$#ARRAY] = $value; @@ -66,14 +69,21 @@ BEGIN { unshift @INC, "lib" } BEGIN { unshift(@INC, LIST) } binmode *STDERR, ":encoding(utf8)"; binmode *STDOUT, ":encoding(utf8)"; +char const *file = __FILE__; $char++ while substr( $got, $char, 1 ) eq substr( $wanted, $char, 1 ); CHECK { $main::phase++ } $config{$k} = [ $config{$k} ] const char *file = __FILE__; const char* file = __FILE__; +$count4 = unshift (@array, 0); +$count7 = unshift (@array, 3, 2, 1); $data = [ $data ]; do { $tainted_value = shift @ENV_values } while(!$tainted_value || ref $tainted_value); do {$x[$x] = $x;} while ($x++) < 10; +eval {CHECK {print ":c3"}}; +eval {INIT {print ":i2"}}; +eval { $proto->can($method) } || push @nok, $method +eval { push \@ISA, __FILE__ }; eval 'v23: $counter++; goto v23 unless $counter == 2'; eval 'v23 : $counter++; goto v23 unless $counter == 2'; $formdata->{$key} = [ $formdata->{$key}, $value ]; @@ -84,11 +94,18 @@ $h{ []} = 123; High resolution alarm, sleep, gettimeofday, interval timers $i = int($i/2) until defined $self->[$i/2]; $invmap_ref->[$i] = [ $invmap_ref->[$i] ]; +is(push(@ary,4), 3); +is(push(@ary,56), 4); +is(unshift(@ary,12), 5); $i++ while $self->{ids}{"$t$i"}++; +{ --$level; push @out, (" " x $level) . "</ul>"; } $mod_hash->{$k} = [ $mod_hash->{$k} ]; -$modlibname =~ s,[\5c\5c/][^\5c\5c/]+$,, while $c--; # Q&D basename +$modlibname =~ s,[\\/][^\\/]+$,, while $c--; # Q&D basename +my $deep1 = []; push @$deep1, $deep1; +my $deep2 = []; push @$deep2, $deep2; my $nfound = select($_[0], $_[1], $_[2], $_[3]); my $nfound = select($_[0], $_[1], $_[2], $gran); +my $n = unshift(@ary,5,6); my @result = splice @temp, $self, $offset, $length, @_; my @r = splice @a, 0, 1, "x", "y"; $_ = {name=>$_}; @@ -98,11 +115,14 @@ $n = unshift @a, "rec0", "rec1", "rec2"; $n = unshift @a, "rec3", "rec4$:"; @$obj = ($meth, (bless [@$obj]), 1); # Avoid circular reference @old = splice(@h, 1, 2, qw(bananas just before)); +unlink <"$filename*">; package XS::APItest; require XSLoader; XSLoader::load() $pa = { -exitval => $pa }; $pa = { -message => $pa }; pop @lines while $lines[-1] eq ""; pop @to while $#to and $to[$#to] == $to[$#to -1]; +pop(@$x); unshift(@q, $q); +@prgs = (@prgs, $file, split "\n########\n", <$fh>) ; print "LA LA LA\n" while 1; # loops forever prog => 'use Config; CHECK { $Config{awk} }', $p->{share_dir} = { dist => [ $p->{share_dir} ] }; @@ -110,24 +130,32 @@ $p->{share_dir} = { dist => $p->{share_dir} }; { push (@Bad, $key) } ( push @hard, $file ), next { push @keep, $_ } +{ push @$output, $x->{buff} } { push (@values, $value) } $resp = [$resp] +s/a|/push @bar, 1/e; $self->{DIR} = [grep $_, split ":", $self->{DIR}]; $share_dir->{dist} = [ $share_dir->{dist} ]; s![^/+]*$!man!&&-d&&!$s{$_}++&&push@m,#_;END{print"@m"}' $spec = [$spec, $_[0]]; +*s = ~(*s); $stack[$i++] &= ~1; $step = [$step]; +sub CHECK {print ":check"} +sub INIT {print ":init"} system("find . -type f -print | xargs chmod 0444"); the while clause. */ Time::HiRes - High resolution alarm, sleep, gettimeofday, interval timers *tmpl = ~*tmpl; *tmps = ~*tmps; +until ($i) { } weaken($objs[@objs] = $h{$_} = []); weaken($objs[@objs] = $$h{$_} = []); while (1) { my $k; } while(1) { sleep(1); } while($foo--) { print("In thread $thread\n"); } +"words" =~ /(word|word|word)(?{push \@got, $1})s$/; +"words" =~ /(word|word|word)(?{push \@got,$1})s$/i; $x->[$j] -= $BASE if $car = (($x->[$j] += $car) >= $BASE) ? 1 : 0; $j++; $x->[scalar @$x] = 0; # avoid || 0 test inside loop $z = splice @a, 3, 1, "recordZ"; |