# Bogus "possibly leaked" reports for pthreads

{
    Thread create leak
    Memcheck:Leak
    fun:calloc
    ...
    fun:pthread_create@@GLIBC_2.2.5
}

# Bogus "possibly leaked" reports for glib .ini file parser

{
    g_keyfile_new_leak
    Memcheck:Leak
    ...
    fun:g_key_file_new
}

{
    g_keyfile_load_leak
    Memcheck:Leak
    ...
    fun:g_key_file_load_from_file
}

# Bogus "possibly lost" report for
#
#   string s("hello");
#   foo(s + " world");

{
    StringCatenation
    Memcheck:Leak
    fun:_Znwm
    fun:_ZNSs4_Rep9_S_createEmmRKSaIcE
    fun:_ZNSs4_Rep8_M_cloneERKSaIcEm
    fun:_ZNSs7reserveEm
    fun:_ZNSs6appendEPKcm
}

# Leak in dynamic linker

{
    DynLinker
    Memcheck:Leak
    fun:calloc
    obj:*
    fun:_Z24__tracepoints__ptrs_initv
    fun:call_init.part.0
    fun:_dl_init
    obj:/lib/x86_64-linux-gnu/ld-2.18.so
}

{
    DynLinker2
    Memcheck:Leak
    fun:calloc
    obj:*
    fun:__tracepoints__ptrs_init
    fun:call_init.part.0
    fun:_dl_init
    obj:/lib/x86_64-linux-gnu/ld-2.18.so
}

# Bogus "invalid read" reports for ::putenv and ::genenv

{
   putenv_read
   Memcheck:Addr1
   ...
   fun:putenv
}

{
   getenv_read
   Memcheck:Addr2
   ...
   fun:getenv
}

# False positives for memory leaks in glib

{
   calloc[Memcheck:Leak]
   Memcheck:Leak
   fun:calloc
   fun:g_malloc0
   ...
   fun:call_init.part.0
   fun:call_init
   fun:_dl_init
}

{
   realloc[Memcheck:Leak]
   Memcheck:Leak
   fun:realloc
   fun:g_realloc
   fun:g_datalist_id_set_data_full
}

{
   calloc[Memcheck:Leak]
   Memcheck:Leak
   ...
   fun:g_socket_create_source
}

{
   calloc[Memcheck:Leak]
   Memcheck:Leak
   ...
   fun:g_signal_connect_data
}

{
   g_type_class_ref[Memcheck:Leak]
   Memcheck:Leak
   ...
   fun:g_type_class_ref
}

{
   g_type_register_static[Memcheck:Leak]
   Memcheck:Leak
   ...
   fun:g_type_register_static
}

{
   g_type_register_fundamental[Memcheck:Leak]
   Memcheck:Leak
   ...
   fun:g_type_register_fundamental
}

{
   g_type_add_interface_static[Memcheck:Leak]
   Memcheck:Leak
   ...
   fun:g_type_add_interface_static
}

{
   malloc[Memcheck:Leak]
   Memcheck:Leak
   ...
   fun:signon_auth_session_new
}

{
   malloc[Memcheck:Leak]
   Memcheck:Leak
   ...
   fun:signon_auth_session_process_async
}

{
   ag_auth_data_unref[Memcheck:Cond]
   Memcheck:Cond
   fun:ag_auth_data_unref
}

{
   malloc[Memcheck:Leak]
   Memcheck:Leak
   fun:malloc
   fun:g_malloc
   fun:g_slice_alloc
   fun:g_slice_alloc0
   ...
   fun:ag_manager_get_service
   ...
   fun:ag_manager_list_services_by_type
   fun:ag_account_list_services
}

{
   operator new(unsigned long)[Memcheck:Leak]
   Memcheck:Leak
   fun:_Znwm
   fun:_ZNSs4_Rep9_S_createEmmRKSaIcE
}

{
   zmq_sockopt_after_close
   Memcheck:Addr4
   fun:_ZN3zmq13socket_base_t9check_tagEv
   fun:zmq_getsockopt
}

# Leaks in net-cpp. See bug #1419620
# TODO: Remove these two suppressions once that bug is fixed.
{
    net_cpp_client_leak
    Memcheck:Leak
    ...
    fun:_ZN4core3net4http4impl4curl6Client3getERKNS1_7Request13ConfigurationE
}

{
    net_cpp_client_leak_2
    Memcheck:Leak
    ...
    fun:_ZN4core3net4http11make_clientEv
}
