From da7603a7eac676d1ca63e8125be06f346f1c0895 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 12 Nov 2025 11:14:12 +0100 Subject: [PATCH] fixup memanalyze.pl strict mode subsequent memory operations also get LIMIT + FAIL so output subsequent FAIL lines to show identified problems --- tests/memanalyze.pl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/memanalyze.pl b/tests/memanalyze.pl index 7e3d560e10..7f59cc3b2a 100755 --- a/tests/memanalyze.pl +++ b/tests/memanalyze.pl @@ -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++; } } }