X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FTest-Valgrind.git;a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FParser%2FSuppressions%2FText.pm;h=90cbea9aa22945a66dbb63d035c85bdf0a60d7dd;hp=6b87cf1e57157a66872d48d989acb52a9052047b;hb=b34179155630f5f4cbea1749af4054a746ded9a4;hpb=a7f76c8c630e9273e6b8c72f884e7fe012da116e diff --git a/lib/Test/Valgrind/Parser/Suppressions/Text.pm b/lib/Test/Valgrind/Parser/Suppressions/Text.pm index 6b87cf1..90cbea9 100644 --- a/lib/Test/Valgrind/Parser/Suppressions/Text.pm +++ b/lib/Test/Valgrind/Parser/Suppressions/Text.pm @@ -9,11 +9,11 @@ Test::Valgrind::Parser::Suppressions::Text - Parse valgrind suppressions output =head1 VERSION -Version 1.12 +Version 1.17 =cut -our $VERSION = '1.12'; +our $VERSION = '1.17'; =head1 DESCRIPTION @@ -23,7 +23,7 @@ This is a L object that can extract suppressions f use Test::Valgrind::Suppressions; -use base qw/Test::Valgrind::Parser::Text Test::Valgrind::Carp/; +use base qw; =head1 METHODS @@ -45,7 +45,13 @@ sub parse { while (<$fh>) { s/^\s*#\s//; # Strip comments - next if /^==/; # Valgrind info line + if (/^==/) { # Valgrind info line + if (/Signal 11 being dropped from thread/) { + # This might loop endlessly + return 1; + } + next; + } s/^\s*//; # Strip leading spaces s/<[^>]+>//; # Strip tags @@ -55,7 +61,6 @@ sub parse { if ($_ eq '{') { # A suppression block begins $in = 1; } elsif ($_ eq '}') { # A suppression block ends - $s = Test::Valgrind::Suppressions->strip_tail($sess, $s); # Strip the tail push @supps, $s; # Add the suppression that just ended to the list $s = ''; # Reset the state $in = 0; @@ -79,11 +84,11 @@ sub parse { my %call; # Frames to append (if the value is 1) or to prepend (if it's 0) if ($t eq 'm') { # malloc can also be called by calloc or realloc - $call{$_} = 1 for qw/calloc realloc/; + $call{$_} = 1 for qw; } elsif ($t eq 're') { # realloc can also call malloc or free - $call{$_} = 0 for qw/malloc free/; + $call{$_} = 0 for qw; } elsif ($t eq 'c') { # calloc can also call malloc - $call{$_} = 0 for qw/malloc/; + $call{$_} = 0 for qw; } my $c = $_; @@ -103,6 +108,8 @@ sub parse { kind => 'Suppression', data => $_, )) for @supps, @extra; + + return 0; } =head1 SEE ALSO @@ -128,7 +135,7 @@ You can find documentation for this module with the perldoc command. =head1 COPYRIGHT & LICENSE -Copyright 2009,2010 Vincent Pit, all rights reserved. +Copyright 2009,2010,2011,2013,2015 Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. @@ -138,7 +145,7 @@ This program is free software; you can redistribute it and/or modify it under th package Test::Valgrind::Report::Suppressions; -use base qw/Test::Valgrind::Report/; +use base qw; sub kinds { shift->SUPER::kinds(), 'Suppression' }