mirror of
https://github.com/curl/curl.git
synced 2026-06-16 03:45:36 +03:00
fixup memanalyze.pl strict mode
subsequent memory operations also get LIMIT + FAIL so output subsequent FAIL lines to show identified problems
This commit is contained in:
parent
d4a7f22593
commit
da7603a7ea
1 changed files with 10 additions and 2 deletions
|
|
@ -137,7 +137,15 @@ while(<$fileh>) {
|
|||
chomp $_;
|
||||
my $line = $_;
|
||||
$lnum++;
|
||||
if($line =~ /^LIMIT ([^ ]*):(\d*) (.*)/) {
|
||||
if($line =~ /^FAIL (.*)/) {
|
||||
my $err = $1;
|
||||
# for informational purposes
|
||||
if($memwarn > 1) {
|
||||
# the first FAIL is not a problem
|
||||
print "WARN: $err after limit\n",
|
||||
}
|
||||
}
|
||||
elsif($line =~ /^LIMIT ([^ ]*):(\d*) (.*)/) {
|
||||
# new memory limit test prefix
|
||||
my $i = $3;
|
||||
my ($source, $linenum) = ($1, $2);
|
||||
|
|
@ -146,7 +154,7 @@ while(<$fileh>) {
|
|||
print "LIMIT: $1 returned error at $source:$linenum\n";
|
||||
}
|
||||
if($strict) {
|
||||
$memwarn=1;
|
||||
$memwarn++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue