Permalink
Browse files

Use valgrind on OS X (separate the suppressions file per-platform)

Change-Id: If933766db5afaa8f271f3b86e5c881d2c2f68170
Reviewed-on: http://gerrit.dechocorp.com/1749
Reviewed-by: Brian Palmer <brian@mozy.com>
  • Loading branch information...
1 parent 32ce5cc commit e37a8821c7b6a8a3f2ab1e1e5d9d38eaff2a8b83 @ccutrer committed with Cody Cutrer Oct 21, 2009
Showing with 196 additions and 73 deletions.
  1. 0 valgrind.supp → linux.supp
  2. +0 −69 mordor.supp
  3. +2 −2 mordor/fiber.cpp
  4. +1 −1 mordor/fiber.h
  5. +1 −1 mordor/pch.h
  6. +192 −0 osx.supp
View
0 valgrind.supp → linux.supp
File renamed without changes.
View
69 mordor.supp
@@ -1,69 +0,0 @@
-{
- pthread_once
- Memcheck:Leak
- fun:malloc
- obj:/lib/ld-2.7.so
- obj:/lib/ld-2.7.so
- obj:/lib/ld-2.7.so
- obj:/lib/ld-2.7.so
- obj:/lib/libc-2.7.so
- obj:/lib/ld-2.7.so
- obj:/lib/libc-2.7.so
- fun:__libc_dlopen_mode
- obj:/lib/libc-2.7.so
- fun:pthread_once
-}
-{
- boost::tss init
- Memcheck:Leak
- fun:malloc
- fun:_ZN5boost6detail25get_once_per_thread_epochEv
- fun:_ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_
- fun:_ZN5boost6detail23get_current_thread_dataEv
- fun:_ZN5boost6detail13find_tss_dataEPKv
- fun:_ZN5boost6detail12get_tss_dataEPKv
-}
-{
- boost::tss var
- Memcheck:Leak
- fun:_Znwm
- fun:_ZN5boost6detail13heap_new_implINS_19thread_specific_ptr*run_custom_cleanup_function*
- fun:_ZN5boost6detail8heap_newINS_19thread_specific_ptr*run_custom_cleanup_function*
- fun:_ZN5boost19thread_specific_ptr*
-}
-{
- boost::tss set
- Memcheck:Leak
- fun:_Znwm
- obj:/usr/lib/libboost_thread.so.1.40.0
- fun:_ZN5boost6detail12set_tss_dataEPKvNS_10shared_ptrINS0_20tss_cleanup_functionEEEPvb
- fun:_ZN5boost19thread_specific_ptr*reset*
-}
-{
- boost::tss set
- Memcheck:Leak
- fun:_Znwm
- fun:_ZN5boost6detail12set_tss_dataEPKvNS_10shared_ptrINS0_20tss_cleanup_functionEEEPvb
- fun:_ZN5boost19thread_specific_ptr*reset*
-}
-{
- boost::tss destroy
- Memcheck:Leak
- fun:_Znwm
- fun:_ZN5boost6detail12shared_countC1IPNS_19thread_specific_ptr*run_custom_cleanup_function*do_heap_delete*_
- fun:_ZN5boost10shared_ptrINS_6detail20tss_cleanup_functionEEC1INS_19thread_specific_ptr*run_custom_cleanup_function*do_heap_delete*
- fun:_ZN5boost10shared_ptrINS_6detail20tss_cleanup_functionEE5resetINS_19thread_specific_ptr*run_custom_cleanup_function*do_heap_delete*
- fun:_ZN5boost19thread_specific_ptr*
-}
-{
- boost::date_time::time_input_facet
- Memcheck:Cond
- obj:/lib/libc-2.7.so
- fun:_ZNKSt11__timepunctIcE6_M_putEPcmPKcPK2tm
- fun:_ZNKSt8time_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE6do_putES3_RSt8ios_basecPK2tmcc
- fun:_ZNKSt8time_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE3putES3_RSt8ios_basecPK2tmPKcSB_
- fun:_ZN5boost9date_time20gather_month_stringsIcEESt6vectorISbIT_St11char_traitsIS3_ESaIS3_EESaIS7_EERKSt6localeb
- fun:_ZN5boost9date_time18format_date_parserINS_9gregorian4dateEcEC1ERKSsRKSt6locale
- fun:_ZN5boost9date_time16date_input_facetINS_9gregorian4dateEcSt19istreambuf_iteratorIcSt11char_traitsIcEEEC2ERKSsm
- fun:_ZN5boost9date_time16time_input_facetINS_10posix_time5ptimeEcSt19istreambuf_iteratorIcSt11char_traitsIcEEEC1ERKSsm
-}
View
4 mordor/fiber.cpp
@@ -399,7 +399,7 @@ Fiber::allocStack()
m_stack = mmap(NULL, m_stacksize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
if (m_stack == MAP_FAILED)
MORDOR_THROW_EXCEPTION_FROM_LAST_ERROR_API("mmap");
-#ifdef LINUX
+#if defined(LINUX) || defined(OSX)
m_valgrindStackId = VALGRIND_STACK_REGISTER(m_stack, (char *)m_stack + m_stacksize);
#endif
m_sp = (char*)m_stack + m_stacksize;
@@ -414,7 +414,7 @@ Fiber::freeStack()
#elif defined(WINDOWS)
VirtualFree(m_stack, 0, MEM_RELEASE);
#elif defined(POSIX)
-#ifdef LINUX
+#if defined(LINUX) || defined(OSX)
VALGRIND_STACK_DEREGISTER(m_valgrindStackId);
#endif
munmap(m_stack, m_stacksize);
View
2 mordor/fiber.h
@@ -173,7 +173,7 @@ class Fiber : public boost::enable_shared_from_this<Fiber>
#elif defined(SETJMP_FIBERS)
jmp_buf m_env;
#endif
-#ifdef LINUX
+#if defined(LINUX) || defined(OSX)
int m_valgrindStackId;
#endif
State m_state, m_yielderNextState;
View
2 mordor/pch.h
@@ -108,7 +108,7 @@
#include <openssl/ssl.h>
#include <zlib.h>
-#ifdef LINUX
+#if defined(LINUX) || defined (OSX)
#include <valgrind/valgrind.h>
#endif
View
192 osx.supp
@@ -0,0 +1,192 @@
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:malloc
+ fun:_ZN5boost6detail25get_once_per_thread_epochEv
+ fun:_ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_
+ fun:_ZN5boost6detail12get_tss_dataEPKv
+}
+{
+ strftime on mac
+ Memcheck:Cond
+ fun:strftime_l$UNIX2003
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:malloc
+ fun:_nc_table_new
+ fun:token_table_add
+ fun:notify_register_check
+ fun:notify_register_tz
+ fun:tzsetwall_basic
+ fun:tzset
+ fun:strftime_l$UNIX2003
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:malloc
+ fun:_nc_table_insert_n
+ fun:token_table_add
+ fun:notify_register_check
+ fun:notify_register_tz
+ fun:tzsetwall_basic
+ fun:tzset
+ fun:strftime_l$UNIX2003
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:calloc
+ fun:token_table_add
+ fun:notify_register_check
+ fun:notify_register_tz
+ fun:tzsetwall_basic
+ fun:tzset
+ fun:strftime_l$UNIX2003
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:calloc
+ fun:_nc_table_new
+ fun:token_table_add
+ fun:notify_register_check
+ fun:notify_register_tz
+ fun:tzsetwall_basic
+ fun:tzset
+ fun:strftime_l$UNIX2003
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:malloc
+ fun:tzsetwall_basic
+ fun:tzset
+ fun:strftime_l$UNIX2003
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:malloc
+ fun:tzload
+ fun:tzsetwall_basic
+ fun:tzset
+ fun:strftime_l$UNIX2003
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:calloc
+ fun:_Unwind_Find_FDE
+ fun:_Unwind_GetIPInfo
+ fun:_Unwind_GetIPInfo
+ fun:_Unwind_RaiseException
+ fun:__cxa_throw
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:malloc
+ fun:get_or_create_key_element
+ fun:_keymgr_get_and_lock_processwide_ptr_2
+ fun:_keymgr_get_and_lock_processwide_ptr
+ fun:_Unwind_Find_FDE
+ fun:_Unwind_GetIPInfo
+ fun:_Unwind_GetIPInfo
+ fun:_Unwind_RaiseException
+ fun:__cxa_throw
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:malloc
+ fun:__register_frame
+ fun:_Unwind_Find_FDE
+ fun:_Unwind_GetIPInfo
+ fun:_Unwind_GetIPInfo
+ fun:_Unwind_RaiseException
+ fun:__cxa_throw
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:calloc
+ fun:_Unwind_Find_FDE
+ fun:_Unwind_GetIPInfo
+ fun:_Unwind_RaiseException
+ fun:__cxa_throw
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:malloc
+ fun:__register_frame
+ fun:_Unwind_Find_FDE
+ fun:_Unwind_GetIPInfo
+ fun:_Unwind_RaiseException
+ fun:__cxa_throw
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:malloc
+ fun:atexit_register
+ fun:__cxa_atexit
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:malloc
+ fun:__cxa_get_globals
+ fun:__cxa_allocate_exception
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:malloc
+ fun:__smakebuf
+ fun:__swsetup
+ fun:__sfvwrite
+ fun:fwrite$UNIX2003
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:_Znwm
+ fun:_ZN5boost63_GLOBAL__N_libs_thread_src_pthread_thread.cpp_00000000_B329391125make_external_thread_dataEv
+ fun:_ZN5boost6detail12set_tss_dataEPKvNS_10shared_ptrINS0_20tss_cleanup_functionEEEPvb
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:_Znwm
+ fun:_ZN5boost6detail12shared_countC2IPNS_19thread_specific_ptr*run_custom_cleanup_functionENS0_14do_heap_deleteIS7_EEEET_T0_
+ fun:_ZN5boost6detail12shared_countC1IPNS_19thread_specific_ptr*run_custom_cleanup_functionENS0_14do_heap_deleteIS7_EEEET_T0_
+ fun:_ZN5boost10shared_ptrINS_6detail20tss_cleanup_functionEEC2INS_19thread_specific_ptr*run_custom_cleanup_functionENS1_14do_heap_deleteIS9_EEEEPT_T0_
+ fun:_ZN5boost10shared_ptrINS_6detail20tss_cleanup_functionEEC1INS_19thread_specific_ptr*run_custom_cleanup_functionENS1_14do_heap_deleteIS9_EEEEPT_T0_
+ fun:_ZN5boost10shared_ptrINS_6detail20tss_cleanup_functionEE5resetINS_19thread_specific_ptr*run_custom_cleanup_functionENS1_14do_heap_deleteIS9_EEEEvPT_T0_
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:_Znwm
+ fun:_ZN5boost6detail13heap_new_implINS_19thread_specific_ptr*run_custom_cleanup_functionERPFvPS4_EEEPT_T0_
+ fun:_ZN5boost6detail8heap_newINS_19thread_specific_ptr*run_custom_cleanup_functionEPFvPS4_EEEPT_RT0_
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:_Znwm
+ fun:_ZN5boost6detail12set_tss_dataEPKvNS_10shared_ptrINS0_20tss_cleanup_functionEEEPvb
+}
+{
+ <insert_a_suppression_name_here>
+ Memcheck:Leak
+ fun:malloc
+ fun:realloc
+ fun:new_sem_from_pool
+ fun:_pthread_cond_wait
+ fun:pthread_cond_wait$UNIX2003
+}

0 comments on commit e37a882

Please sign in to comment.