You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2014/07/27 07:12:11 UTC
git commit: refs/heads/master - Rework valgrind suppressions.
Repository: lucy
Updated Branches:
refs/heads/master 81a065053 -> e45295bbf
Rework valgrind suppressions.
Add a new suppressions files with multi-level wildcards. Eliminate the
local.supp autogenerated suppressions file.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/e45295bb
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/e45295bb
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/e45295bb
Branch: refs/heads/master
Commit: e45295bbf18c213c936f11b2001d76248fd1c91d
Parents: 81a0650
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Fri Jul 25 18:43:11 2014 -0700
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Fri Jul 25 18:43:11 2014 -0700
----------------------------------------------------------------------
devel/conf/lucyperl.supp | 193 +++++++++------------------------------
perl/buildlib/Lucy/Build.pm | 41 +--------
2 files changed, 45 insertions(+), 189 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/e45295bb/devel/conf/lucyperl.supp
----------------------------------------------------------------------
diff --git a/devel/conf/lucyperl.supp b/devel/conf/lucyperl.supp
index 2ba8328..fed6dde 100644
--- a/devel/conf/lucyperl.supp
+++ b/devel/conf/lucyperl.supp
@@ -14,187 +14,80 @@
# limitations under the License.
{
- <insert a suppression name here>
+ <boot_Clownfish>
Memcheck:Leak
- fun:calloc
- fun:lucy_Memory_wrapped_calloc
- fun:lucy_VTable_make_obj
- fun:lucy_LFReg_new
- fun:lucy_VTable_init_registry
- fun:*
+ ...
+ fun:boot_Clownfish
+ ...
}
{
- <insert a suppression name here>
+ <XS_DynaLoader_dl_load_file>
Memcheck:Leak
- fun:calloc
- fun:lucy_Memory_wrapped_calloc
- fun:lucy_VTable_make_obj
- fun:S_alt_field_type
- fun:*
+ ...
+ fun:XS_DynaLoader_dl_load_file
+ ...
}
{
- <insert_a_suppression_name_here>
+ <cfish_Class_singleton>
Memcheck:Leak
- fun:calloc
- fun:lucy_Memory_wrapped_calloc
- fun:lucy_LFReg_init
- fun:lucy_LFReg_new
- fun:lucy_VTable_init_registry
- fun:*
+ ...
+ fun:cfish_Class_singleton
+ ...
}
-
{
- <insert a suppression name here>
+ <cfish_Class_bootstrap>
Memcheck:Leak
- fun:malloc
- fun:lucy_Memory_wrapped_malloc
- fun:lucy_LFReg_register
- fun:lucy_VTable_add_to_registry
- fun:*
+ ...
+ fun:cfish_Class_bootstrap
+ ...
}
-
{
- <Class name key for VTable_registry (malloc)>
+ <cfish_Class_add_alias_to_registry>
Memcheck:Leak
- fun:malloc
- fun:lucy_Memory_wrapped_malloc
- fun:lucy_CB_new_from_trusted_utf8
- fun:lucy_CB_clone
- fun:lucy_VTable_add_to_registry
- fun:*
+ ...
+ fun:cfish_Class_add_alias_to_registry
+ ...
}
{
- <Class name key for VTable_registry (calloc)>
+ <cfish_Lucy_bootstrap>
Memcheck:Leak
- fun:calloc
- fun:lucy_Memory_wrapped_calloc
- fun:lucy_VTable_make_obj
- fun:lucy_CB_new_from_trusted_utf8
- fun:lucy_CB_clone
- fun:lucy_VTable_add_to_registry
- fun:*
+ ...
+ fun:cfish_Lucy_bootstrap
+ ...
}
{
- <insert a suppression name here>
+ <Perl_pad_findmy_pvn>
Memcheck:Leak
- fun:calloc
- fun:lucy_Memory_wrapped_calloc
- fun:lucy_VTable_clone
- fun:lucy_VTable_singleton
- fun:*
+ ...
+ fun:Perl_pad_findmy_pvn
+ fun:Perl_yylex
+ fun:Perl_yyparse
+ ...
}
{
- <Add class name to child VTable (malloc)>
+ <Perl_pad_add_name_pvn>
Memcheck:Leak
- fun:malloc
- fun:lucy_Memory_wrapped_malloc
- fun:lucy_CB_new_from_trusted_utf8
- fun:lucy_CB_clone
- fun:lucy_VTable_singleton
- fun:*
+ ...
+ fun:Perl_pad_add_name_pvn
+ fun:Perl_allocmy
+ fun:Perl_yylex
+ fun:Perl_yyparse
+ ...
}
-{
- <Add class name to child VTable (calloc)>
- Memcheck:Leak
- fun:calloc
- fun:lucy_Memory_wrapped_calloc
- fun:lucy_VTable_make_obj
- fun:lucy_CB_new_from_trusted_utf8
- fun:lucy_CB_clone
- fun:lucy_VTable_singleton
- fun:*
-}
-
-{
- <Add aliased class name for VTable (malloc)>
- Memcheck:Leak
- fun:malloc
- fun:lucy_Memory_wrapped_malloc
- fun:lucy_CB_new_from_trusted_utf8
- fun:lucy_CB_clone
- fun:lucy_VTable_add_alias_to_registry
- fun:*
-}
-
-{
- <Add aliased class name for VTable (calloc)>
- Memcheck:Leak
- fun:calloc
- fun:lucy_Memory_wrapped_calloc
- fun:lucy_VTable_make_obj
- fun:lucy_CB_new_from_trusted_utf8
- fun:lucy_CB_clone
- fun:lucy_VTable_add_alias_to_registry
- fun:*
-}
-
-{
- <insert_a_suppression_name_here>
- Memcheck:Leak
- fun:malloc
- fun:lucy_Memory_wrapped_malloc
- fun:lucy_LFReg_register
- fun:lucy_VTable_add_alias_to_registry
- fun:*
-}
-
-{
- <insert_a_suppression_name_here>
- Memcheck:Leak
- fun:malloc
- fun:lucy_Memory_wrapped_malloc
- fun:lucy_CB_init
- fun:lucy_CB_new
- fun:lucy_CB_newf
- fun:lucy_Bool_init_class
- fun:*
-}
-
-{
- <insert_a_suppression_name_here>
- Memcheck:Leak
- fun:calloc
- fun:lucy_Memory_wrapped_calloc
- fun:lucy_VTable_make_obj
- fun:lucy_CB_new
- fun:lucy_CB_newf
- fun:lucy_Bool_init_class
- fun:*
-}
-
-{
- <insert_a_suppression_name_here>
- Memcheck:Leak
- fun:calloc
- fun:lucy_Memory_wrapped_calloc
- fun:lucy_VTable_make_obj
- fun:lucy_Bool_init_class
- fun:*
-}
-
-{
- <insert_a_suppression_name_here>
- Memcheck:Leak
- fun:calloc
- fun:lucy_Memory_wrapped_calloc
- fun:lucy_VTable_make_obj
- fun:lucy_Hash_init_class
- fun:*
-}
{
- <insert_a_suppression_name_here>
+ <_dl_catch_error>
Memcheck:Leak
- fun:calloc
- fun:lucy_Memory_wrapped_calloc
- fun:lucy_VTable_allocate
- fun:lucy_bootstrap_parcel
- fun:*
+ ...
+ fun:_dl_map_object
+ ...
+ fun:_dl_catch_error
+ ...
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/e45295bb/perl/buildlib/Lucy/Build.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Build.pm b/perl/buildlib/Lucy/Build.pm
index 0e5a3d5..973c1f3 100644
--- a/perl/buildlib/Lucy/Build.pm
+++ b/perl/buildlib/Lucy/Build.pm
@@ -111,47 +111,11 @@ sub ACTION_copy_clownfish_includes {
$self->cf_copy_include_file( qw( Lucy Util ToolSet.h ) );
}
-sub ACTION_suppressions {
- my $self = shift;
- my $LOCAL_SUPP = 'local.supp';
- return
- if $self->up_to_date( '../devel/bin/valgrind_triggers.pl',
- $LOCAL_SUPP );
-
- # Generate suppressions.
- print "Writing $LOCAL_SUPP...\n";
- $self->add_to_cleanup($LOCAL_SUPP);
- my $command
- = "yes | "
- . $self->_valgrind_base_command
- . "--gen-suppressions=yes "
- . $self->perl
- . " ../devel/bin/valgrind_triggers.pl 2>&1";
- my $suppressions = `$command`;
- $suppressions =~ s/^==.*?\n//mg;
- $suppressions =~ s/^--.*?\n//mg;
- my $rule_number = 1;
-
- while ( $suppressions =~ /<insert.a.*?>/ ) {
- $suppressions =~ s/^\s*<insert.a.*?>/{\n <core_perl_$rule_number>/m;
- $rule_number++;
- }
-
- # Change e.g. fun:_vgrZU_libcZdsoZa_calloc to fun:calloc
- $suppressions =~ s/fun:\w+_((m|c|re)alloc)/fun:$1/g;
-
- # Write local suppressions file.
- open( my $supp_fh, '>', $LOCAL_SUPP )
- or confess("Can't open '$LOCAL_SUPP': $!");
- print $supp_fh $suppressions;
-}
-
sub _valgrind_base_command {
return
"PERL_DESTRUCT_LEVEL=2 LUCY_VALGRIND=1 valgrind "
. "--leak-check=yes "
. "--show-reachable=yes "
- . "--num-callers=10 "
. "--dsymutil=yes "
. "--suppressions=../devel/conf/lucyperl.supp ";
}
@@ -173,13 +137,12 @@ sub ACTION_test_valgrind {
if ( !$ENV{LUCY_VALGRIND} ) {
warn "\$ENV{LUCY_VALGRIND} not true -- possible false positives";
}
- $self->depends_on(qw( code suppressions ));
+ $self->depends_on('code');
- # Unbuffer STDOUT, grab test file names and suppressions files.
+ # Unbuffer STDOUT, grab test file names.
$|++;
my $t_files = $self->find_test_files; # not public M::B API, may fail
my $valgrind_command = $self->_valgrind_base_command;
- $valgrind_command .= "--suppressions=local.supp ";
if ( my $local_supp = $self->args('suppressions') ) {
for my $supp ( split( ',', $local_supp ) ) {