X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FTool%2Fmemcheck.pm;h=78236c7bc0301cadfa6c41e8d8e0d74e7026f486;hb=cea977523ce9c4be865b97a0813a5e14cce873f9;hp=af6f3f0bb98ed39fbfdeca3ac57c7a2495048fd0;hpb=195f0244c01e942307e13d693f196156b9263444;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind/Tool/memcheck.pm b/lib/Test/Valgrind/Tool/memcheck.pm index af6f3f0..78236c7 100644 --- a/lib/Test/Valgrind/Tool/memcheck.pm +++ b/lib/Test/Valgrind/Tool/memcheck.pm @@ -9,11 +9,11 @@ Test::Valgrind::Tool::memcheck - Run an analysis through the memcheck tool. =head1 VERSION -Version 1.11 +Version 1.13 =cut -our $VERSION = '1.11'; +our $VERSION = '1.13'; =head1 DESCRIPTION @@ -21,7 +21,7 @@ This class contains the information required by the session for running the C; =head1 METHODS @@ -149,7 +149,7 @@ You can find documentation for this module with the perldoc command. =head1 COPYRIGHT & LICENSE -Copyright 2009 Vincent Pit, all rights reserved. +Copyright 2009,2010,2011 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. @@ -159,11 +159,11 @@ This program is free software; you can redistribute it and/or modify it under th package Test::Valgrind::Tool::memcheck::Report; -use base qw/Test::Valgrind::Report/; +use base qw; -our $VERSION = '1.11'; +our $VERSION = '1.13'; -my @kinds = qw/ +my @kinds = qw< InvalidFree MismatchedFree InvalidRead @@ -179,7 +179,7 @@ my @kinds = qw/ Leak_IndirectlyLost Leak_PossiblyLost Leak_StillReachable -/; +>; push @kinds, __PACKAGE__->SUPER::kinds(); my %kinds_hashed = map { $_ => 1 } @kinds; @@ -216,9 +216,9 @@ sub dump { my ($ip, $obj, $fn, $dir, $file, $line) = map { (defined) ? $_ : '?' } @$_; my $frame; if ($fn eq '?' and $obj eq '?') { - $ip =~ s/^0x//g; - $ip = hex $ip; - $frame = sprintf "0x%0${pad}X", $ip; + $ip =~ s/^0x//gi; + my $l = length $ip; + $frame = '0x' . ($l < $pad ? ('0' x ($pad - $l)) : '') . uc($ip); } else { $frame = sprintf '%s (%s) [%s:%s]', $fn, $obj, $file, $line; }