- } elsif ($_ eq '}') {
- my $unknown_tail;
- ++$unknown_tail while $s =~ s/(\n)\s*obj:\*\s*$/$1/;
- $s .= "...\n" if $unknown_tail and $sess->version ge '3.4.0';
- push @supps, $s;
- $s = '';
+ } elsif ($_ eq '}') { # A suppression block ends
+ # With valgrind 3.4.0, we can replace unknown series of frames by '...'
+ if ($sess->version ge '3.4.0') {
+ my $unknown_tail;
+ ++$unknown_tail while $s =~ s/(\n)\s*obj:\*\s*$/$1/;
+ $s .= "...\n" if $unknown_tail;
+ }
+
+ push @supps, $s; # Add the suppression that just ended to the list
+ $s = ''; # Reset the state