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:
Daniel Stenberg 2025-11-12 11:14:12 +01:00
parent d4a7f22593
commit da7603a7ea
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -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++;
}
}
}