# Leaks in valgrind itself with version 1:3.10.1-1ubuntu3
# TODO: Check periodically whether these go away with a later version.
{
    valgrind
    Memcheck:Leak
    match-leak-kinds: definite
    ...
    obj:/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
}

# Assorted suppressions for other libraries below

{
    g_settings_new
    Memcheck:Leak
    match-leak-kinds: definite
    ...
    fun:g_settings_backend_get_default
    ...
    fun:g_object_new_valist
}

{
   g_file_new_for_path
   Memcheck:Leak
   match-leak-kinds: definite
    ...
   fun:g_type_create_instance
   ...
   fun:g_object_newv
   fun:g_object_new
   fun:g_io_module_new
   fun:g_io_modules_scan_all_in_directory_with_scope
   ...
   fun:g_file_new_for_path
   fun:_Z15filename_to_uriRKSs
}

{
    glib_main_loop
    Memcheck:Leak
    match-leak-kinds: definite
    fun:malloc
    ...
    fun:start_thread
    fun:clone
}

{
    glib_main_loop2
    Memcheck:Leak
    match-leak-kinds: definite
    fun:calloc
    ...
    fun:start_thread
    fun:clone
}

{
    QNetworkConfigurationManager
    Memcheck:Leak
    match-leak-kinds: definite
    ...
    fun:_ZN35QNetworkConfigurationManagerPrivate10initializeEv
    fun:_Z35qNetworkConfigurationManagerPrivatev
    fun:_ZN28QNetworkConfigurationManagerC1EP7QObject
}

{
    QNetworkConfigurationManager2
    Memcheck:Leak
    match-leak-kinds: definite
    fun:malloc
    ...
    fun:_ZN35QNetworkConfigurationManagerPrivate20updateConfigurationsEv
    fun:_ZN35QNetworkConfigurationManagerPrivate10initializeEv
    fun:_Z35qNetworkConfigurationManagerPrivatev
}

{
    QCoreApplication
    Memcheck:Leak
    match-leak-kinds: definite
    fun:calloc
    ...
    fun:_ZN7QObject5eventEP6QEvent
    fun:_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent
    fun:_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData
}

{
    QCoreApplication2
    Memcheck:Param
    writev(vector[...])
    ...
    fun:xcb_wait_for_reply
    ...
    fun:_ZN7QObject5eventEP6QEvent
    fun:_ZN16QCoreApplication6notifyEP7QObjectP6QEvent
    fun:_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent
    fun:_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData
    ...
    fun:g_main_context_dispatch
    ...
    fun:g_main_context_iteration
    fun:_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE
    fun:_ZN16QCoreApplication13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEEi
}

{
    QProcess
    Memcheck:Leak
    match-leak-kinds: definite
    fun:malloc
    ...
    fun:_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE
    fun:_ZN7QThread4execEv
}

{
   QThread
   Memcheck:Leak
   match-leak-kinds: definite
    ...
   fun:_ZN10QEventLoopC1EP7QObject
   fun:_ZN7QThread4execEv
   ...
   fun:start_thread
   fun:clone
}

{
    QNetworkAccessManager
    Memcheck:Leak
    match-leak-kinds: definite
    ...
    fun:_ZN21QNetworkAccessManager13createRequestENS_9OperationERK15QNetworkRequestP9QIODevice
    fun:_ZN21QNetworkAccessManager3getERK15QNetworkRequest
    fun:_ZN5unity11thumbnailer8internal22UbuntuServerDownloader12download_urlERK4QUrlNSt6chrono8durationIlSt5ratioILl1ELl1000EEEE
}

{
    QHash
    Memcheck:Cond
    ...
    fun:_Z5qHashRK10QByteArrayj
}

{
    QHash_2
    Memcheck:Cond
    ...
    fun:_Z5qHashRK7QStringj
}

{
   QImageReader
   Memcheck:Cond
   ...
   obj:/usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/libqjpeg.so
   ...
   obj:/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.4.2
   fun:_ZNK12QImageReader4sizeEv
}

{
    gst_plugin_load_file
    Memcheck:Leak
    match-leak-kinds: definite
    fun:malloc
    fun:dl_open_worker
    fun:_dl_catch_error
    fun:_dl_open
    fun:dlopen_doit
    fun:_dl_catch_error
    fun:_dlerror_run
    ...
    fun:g_module_open
    fun:gst_plugin_load_file
}

{
    gstreamer_uninitialized_jump
    Memcheck:Cond
    obj:/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoconvert.so
    obj:/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoconvert.so
    obj:/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoconvert.so
    obj:/usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.405.0
    obj:/usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.405.0
    obj:/usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.405.0
    obj:/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.405.0
    obj:/usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.405.0
    obj:/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.405.0
    obj:/lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1
    obj:/lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1
    fun:start_thread
    fun:clone
}

{
    gdk_pixbuf_save_to_buffer
    Memcheck:Value8
    ...
    fun:jpeg_write_scanlines
    ...
    fun:gdk_pixbuf_save_to_callbackv
    fun:gdk_pixbuf_save_to_bufferv
    fun:gdk_pixbuf_save_to_buffer
}

{
    gdk_pixbuf_save_to_buffer2
    Memcheck:Cond
    ...
    fun:jpeg_write_scanlines
    ...
    fun:gdk_pixbuf_save_to_callbackv
    fun:gdk_pixbuf_save_to_bufferv
    fun:gdk_pixbuf_save_to_buffer
}

{
    gdk_pixbuf_loader_write
    Memcheck:Value8
    fun:_ZN7leveldb6crc32c6ExtendEjPKcm
    fun:_ZN7leveldb3log6Writer18EmitPhysicalRecordENS0_10RecordTypeEPKcm
    fun:_ZN7leveldb3log6Writer9AddRecordERKNS_5SliceE
    fun:_ZN7leveldb6DBImpl5WriteERKNS_12WriteOptionsEPNS_10WriteBatchE
}

{
    gdk_pixbuf_save
    Memcheck:Param
    write(buf)
    obj:/lib/x86_64-linux-gnu/libc-2.21.so
    fun:_IO_file_write@@GLIBC_2.2.5
    fun:new_do_write
    fun:_IO_file_xsputn@@GLIBC_2.2.5
    fun:fwrite
    obj:/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-tiff.so
    obj:/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-tiff.so
    fun:gdk_pixbuf_savev
    fun:gdk_pixbuf_save
}

{
    gdk_pixbuf_loader_write2
    Memcheck:Param
    write(buf)
    ...
    fun:_ZN7leveldb3log6Writer18EmitPhysicalRecordENS0_10RecordTypeEPKcm
    fun:_ZN7leveldb3log6Writer9AddRecordERKNS_5SliceE
    fun:_ZN7leveldb6DBImpl5WriteERKNS_12WriteOptionsEPNS_10WriteBatchE
}

{
    leveldb_write
    Memcheck:Param
    write(buf)
    obj:/lib/x86_64-linux-gnu/libc-2.21.so
    fun:_IO_file_write@@GLIBC_2.2.5
    fun:new_do_write
    fun:_IO_do_write@@GLIBC_2.2.5
    fun:_IO_file_sync@@GLIBC_2.2.5
    fun:fflush_unlocked
    obj:/usr/lib/x86_64-linux-gnu/libleveldb.so.1.17
    fun:_ZN7leveldb3log6Writer18EmitPhysicalRecordENS0_10RecordTypeEPKcm
    fun:_ZN7leveldb3log6Writer9AddRecordERKNS_5SliceE
    fun:_ZN7leveldb6DBImpl5WriteERKNS_12WriteOptionsEPNS_10WriteBatchE
}
