Skip to content

Instantly share code, notes, and snippets.

@xslim
Created December 5, 2014 10:19
Show Gist options
  • Save xslim/ab46a930a956fac27f65 to your computer and use it in GitHub Desktop.
Save xslim/ab46a930a956fac27f65 to your computer and use it in GitHub Desktop.
Valgring suppressions for Objective-C
{
<insert_a_suppression_name_here>
Memcheck:Leak
match-leak-kinds: possible
fun:malloc_zone_calloc
fun:_read_images
fun:map_images_nolock
fun:map_images
}
{
<insert_a_suppression_name_here>
Memcheck:Leak
match-leak-kinds: possible
fun:malloc_zone_malloc
fun:_ZL12_NXMapRehashP11_NXMapTable
fun:NXMapInsert
}
{
<insert_a_suppression_name_here>
Memcheck:Leak
match-leak-kinds: possible
fun:malloc_zone_malloc
fun:_ZL12_NXMapRehashP11_NXMapTable
fun:NXMapInsert
}
{
<insert_a_suppression_name_here>
Memcheck:Leak
match-leak-kinds: possible
fun:malloc_zone_calloc
fun:_read_images
fun:map_images_nolock
fun:map_images
fun:dyld_register_image_state_change_handler
fun:_objc_init
fun:_os_object_init
fun:libdispatch_init
fun:libSystem_initializer
}
{
libobjc_leak_poss
Memcheck:Leak
match-leak-kinds: possible
obj:/usr/lib/libobjc.A.dylib
}
{
libobjc_leak_def
Memcheck:Leak
match-leak-kinds: definite
obj:/usr/lib/libobjc.A.dylib
}
{
objc_mutex_malloc
Memcheck:Leak
match-leak-kinds: definite
fun:malloc_zone_malloc
fun:recursive_mutex_init
fun:_objc_init
}
{
objc_hash_ins
Memcheck:Leak
match-leak-kinds: possible
fun:malloc_zone_calloc
fun:NXHashInsert
}
{
objc_map_ins
Memcheck:Leak
match-leak-kinds: possible
fun:malloc_zone_malloc
fun:NXMapInsert
}
{
objc_map_t_new
Memcheck:Leak
match-leak-kinds: possible
fun:malloc_zone_malloc
fun:NXCreateMapTableFromZone
}
{
objc_map_key_copy
Memcheck:Leak
match-leak-kinds: possible
fun:malloc_zone_malloc
fun:_strdup_internal
fun:NXMapKeyCopyingInsert
}
@calvinchengx
Copy link

Unfortunately, Valgrind r14972 won't compile for me on Mac OS X 10.10 (Mavericks). r14960 is the working version and I am using the same suppression set as above.

@Echelon9
Copy link

calvinchengx: what is the compile error? I can probably assist you getting trunk compiling and working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment