[Gc] valgrind and the GC

Kenneth C. Schalk ken at xorian.net
Mon Nov 15 09:25:09 PST 2004


> if it's simply because the GC is doing funky but correct things that
> Valgrind doesn't understand (in which case is it possible to modify
> Valgrind or provide rule-suppression files to make it friendly with the
> GC library).

I spent some time trying to make valgrind work with an application
using the collector.  Among other things, I ran into a bug which was
only recently fixed:

http://bugs.kde.org/show_bug.cgi?id=72082

I'm attaching the valgrind error suppression file I was using when I
was last doing this (almost a year ago now).  I won't pretend it's
great, and there are at least a few in there that are specific to the
GC configuration I was using, but you might find it useful.

--Ken
-------------- next part --------------
# ----------------------------------------------------------------------
# Boehm collector suppressions.

# Cobbled together by Ken Schalk (ken at xorian dot net)
# ----------------------------------------------------------------------

{
   GC_* Cond
   Memcheck:Cond
   fun:GC_*
}

{
   GC_* Value4
   Memcheck:Value4
   fun:GC_*
}

{
   GC_* Addr1
   Memcheck:Addr1
   fun:GC_*
}

{
   GC_* Addr2
   Memcheck:Addr2
   fun:GC_*
}

{
   GC_* Addr4
   Memcheck:Addr4
   fun:GC_*
}

{
   memset/GC_* Addr4
   Memcheck:Addr4
   fun:memset
   fun:GC_*
}

{
   get_index/GC_* Addr4
   Memcheck:Addr4
   fun:get_index
   fun:GC_*
}


{
   memset/get_index/GC_* Addr4
   Memcheck:Addr4
   fun:memset
   fun:get_index
   fun:GC_*
}

{
   setup_header/GC_* Addr1
   Memcheck:Addr1
   fun:setup_header
   fun:GC_*
}

{
   setup_header/GC_* Addr2
   Memcheck:Addr2
   fun:setup_header
   fun:GC_*
}

{
   setup_header/GC_* Addr4
   Memcheck:Addr4
   fun:setup_header
   fun:GC_*
}

{
   memset/setup_header/GC_* Addr4
   Memcheck:Addr4
   fun:memset
   fun:setup_header
   fun:GC_*
}

{
   pthread_*/GC_* Addr4
   Memcheck:Addr4
   fun:__pthread_*
   fun:GC_*
}

{
   clear_marks_for_block/GC_* Addr1
   Memcheck:Addr1
   fun:clear_marks_for_block
   fun:GC_*
}

{
   clear_marks_for_block/GC_* Addr4
   Memcheck:Addr4
   fun:clear_marks_for_block
   fun:GC_*
}

{
   memset/clear_marks_for_block/GC_* Addr4
   Memcheck:Addr4
   fun:memset
   fun:clear_marks_for_block
   fun:GC_*
}

{
   free_hdr/GC_* Addr4
   Memcheck:Addr4
   fun:free_hdr
   fun:GC_*
}

{
   alloc_hdr/GC_* Addr4
   Memcheck:Addr4
   fun:alloc_hdr
   fun:GC_*
}

{
   return_freelists/GC_destroy_thread_local
   Memcheck:Addr4
   fun:return_freelists
   fun:GC_destroy_thread_local
}

{
   memset/pthread_join
   Memcheck:Addr4
   fun:memset
   fun:__wrap_pthread_join
}

# The pthread_create wrapper allocates a temporary data structure for
# the collector.

{
   pthread_create Addr4
   Memcheck:Addr4
   fun:__wrap_pthread_create
}

{
   memset/pthread_create Addr4
   Memcheck:Addr4
   fun:memset
   fun:__wrap_pthread_create
}

{
   pthread_detach Addr2
   Memcheck:Addr2
   fun:__wrap_pthread_detach
}


More information about the Gc mailing list