Skip to content

Instantly share code, notes, and snippets.

@tshinnic
Created August 2, 2014 19:23
Show Gist options
  • Save tshinnic/2febc414cee2a7f96066 to your computer and use it in GitHub Desktop.
Save tshinnic/2febc414cee2a7f96066 to your computer and use it in GitHub Desktop.
Valgrind suppression file for FontForge built with Python 3
# This file for FontForge built with Python 3
#
# The below suppressions suppress just about every entry that Python
# could have contributed to. This is likely excessive... ;)
#
# We make good use of the wildcarding features of Valgrind. By using
# wildcarded function names we can cover more cases with just one entry.
# And by using wildcarded library object filenames we can hope this
# source is portable to more systems.
# On the tested system (Fedora 20), these libraries are:
# /usr/lib64/libgobject-2.0.so.0.3800.2
# /usr/lib64/libpython3.3m.so.1.0
# /usr/lib64/ld-2.18.so
# On one tested system (Ubuntu 14.04), these libraries are:
# /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4000.0
# /usr/lib/x86_64-linux-gnu/libpython3.4m.so.1.0
# /lib/x86_64-linux-gnu/ld-2.19.so
# On Fedora 20 (and Python 3.3)
# Initialization only
#
# with -SkipPythonInitFiles)
#
# 19 ff_pyinit_embedded_python_leak_2 valgrind_ff_p3.supp:129 suppressed: 2,304 bytes in 19 blocks
# 100 ff_pyeval_malloc_leak_1 valgrind_ff_p3.supp:252 suppressed: 93,723 bytes in 611 blocks
# 9 ff_pyeval_malloc_leak_2 valgrind_ff_p3.supp:260 suppressed: 14,759 bytes in 121 blocks
# 2 ff_pyeval_realloc_leak_1 valgrind_ff_p3.supp:271 suppressed: 1,256 bytes in 2 blocks
# 3 ff_pyeval_realloc_leak_2 valgrind_ff_p3.supp:279 suppressed: 1,568 bytes in 3 blocks
# 366 ff_py_malloc_lib_leak_1 valgrind_ff_p3.supp:290 suppressed: 157,520 bytes in 2,067 blocks
# 9 ff_py_malloc_lib_leak_2 valgrind_ff_p3.supp:301 suppressed: 240 bytes in 9 blocks
# 40 ff_py_malloc_lib_leak_3 valgrind_ff_p3.supp:310 suppressed: 28,494 bytes in 463 blocks
# 6 ff_py_malloc_lib_leak_4 valgrind_ff_p3.supp:320 suppressed: 5,587 bytes in 116 blocks
# 7 ff_py_malloc_lib_leak_5 valgrind_ff_p3.supp:330 suppressed: 328 bytes in 11 blocks
# 2 ff_py_malloc_lib_leak_6 valgrind_ff_p3.supp:340 suppressed: 4,752 bytes in 33 blocks
# 2 ff_py_malloc_lib_leak_7 valgrind_ff_p3.supp:350 suppressed: 196,712 bytes in 2 blocks
# 60 ff_dlinit_calloc_leak_1 valgrind_ff_p3.supp:377 suppressed: 4,164 bytes in 60 blocks
# 21 ff_dlinit_malloc_leak_1 valgrind_ff_p3.supp:389 suppressed: 320 bytes in 21 blocks
# 1 ff_dlinit_realloc_leak_1 valgrind_ff_p3.supp:401 suppressed: 184 bytes in 1 blocks
#
# without -SkipPythonInitFiles
#
# 19 ff_pyinit_embedded_python_leak_2 valgrind_ff_p3.supp:131 suppressed: 2,304 bytes in 19 blocks
# 98 ff_pyeval_malloc_leak_1 valgrind_ff_p3.supp:254 suppressed: 92,848 bytes in 600 blocks
# 9 ff_pyeval_malloc_leak_2 valgrind_ff_p3.supp:262 suppressed: 14,759 bytes in 121 blocks
# 5 ff_pyeval_realloc_leak_2 valgrind_ff_p3.supp:281 suppressed: 2,768 bytes in 5 blocks
# 377 ff_py_malloc_lib_leak_1 valgrind_ff_p3.supp:292 suppressed: 162,176 bytes in 2,124 blocks
# 9 ff_py_malloc_lib_leak_2 valgrind_ff_p3.supp:303 suppressed: 240 bytes in 9 blocks
# 40 ff_py_malloc_lib_leak_3 valgrind_ff_p3.supp:312 suppressed: 30,112 bytes in 490 blocks
# 6 ff_py_malloc_lib_leak_4 valgrind_ff_p3.supp:322 suppressed: 5,587 bytes in 116 blocks
# 7 ff_py_malloc_lib_leak_5 valgrind_ff_p3.supp:332 suppressed: 328 bytes in 11 blocks
# 2 ff_py_malloc_lib_leak_6 valgrind_ff_p3.supp:342 suppressed: 4,752 bytes in 33 blocks
# 2 ff_py_malloc_lib_leak_7 valgrind_ff_p3.supp:352 suppressed: 196,712 bytes in 2 blocks
# 60 ff_dlinit_calloc_leak_1 valgrind_ff_p3.supp:397 suppressed: 4,164 bytes in 60 blocks
# 21 ff_dlinit_malloc_leak_1 valgrind_ff_p3.supp:409 suppressed: 320 bytes in 21 blocks
# 1 ff_dlinit_realloc_leak_1 valgrind_ff_p3.supp:421 suppressed: 184 bytes in 1 blocks
# On Ubuntu 14.04 (and Python 3.4)
# Initialization only
#
# without -SkipPythonInitFiles
#
# 268 ff_pyinit_embedded_python_addr4_2 valgrind_ff_p3.supp:91
# 2 ff_pyinit_embedded_python_cond_1 valgrind_ff_p3.supp:101
# 1 ff_pyinit_embedded_python_cond_2 valgrind_ff_p3.supp:110
# 2 ff_pyinit_embedded_python_value8_1 valgrind_ff_p3.supp:120
# 1 ff_pyinit_embedded_python_value8_2 valgrind_ff_p3.supp:129
# 23 ff_pyeval_addr4_1 valgrind_ff_p3.supp:220
# 32 ff_pyeval_addr4_2 valgrind_ff_p3.supp:230
# 7 ff_pyeval_cond_1 valgrind_ff_p3.supp:241
# 4 ff_pyeval_malloc_leak_2 valgrind_ff_p3.supp:278 suppressed: 3,520 bytes in 6 blocks
# 7 ff_pyeval_value8_2 valgrind_ff_p3.supp:259
# 114 ff_pyobject_callmethod_addr4_1 valgrind_ff_p3.supp:400
# 296 ff_pyfinal_embedded_python_addr4_1 valgrind_ff_p3.supp:180
# 6 ff_pyfinal_embedded_python_cond_1 valgrind_ff_p3.supp:199
# 4 ff_pyfinal_embedded_python_value8_1 valgrind_ff_p3.supp:189
# 60 ff_dlinit_calloc_leak_1 valgrind_ff_p3.supp:413 suppressed: 4,164 bytes in 60 blocks
# 21 ff_dlinit_malloc_leak_1 valgrind_ff_p3.supp:425 suppressed: 320 bytes in 21 blocks
# 1 ff_dlinit_realloc_leak_1 valgrind_ff_p3.supp:437 suppressed: 184 bytes in 1 blocks
# - - - - - - - - - - - - - - - - - - - - - - - -
{
ff_pyinit_embedded_python_addr4_1
Memcheck:Addr4
obj:*/libpython3.*.so.*
...
fun:_Py_InitializeEx_Private
fun:FontForge_InitializeEmbeddedPython
fun:fontforge_main
}
{
ff_pyinit_embedded_python_addr4_2
Memcheck:Addr4
obj:*/libpython3.*.so.*
...
fun:LoadFilesInPythonInitDir
fun:PyFF_ProcessInitFiles
fun:fontforge_main
}
{
ff_pyinit_embedded_python_cond_1
Memcheck:Cond
obj:*/libpython3.*.so.*
...
fun:_Py_InitializeEx_Private
fun:FontForge_InitializeEmbeddedPython
fun:fontforge_main
}
{
ff_pyinit_embedded_python_cond_2
Memcheck:Cond
obj:*/libpython3.*.so.*
...
fun:LoadFilesInPythonInitDir
fun:PyFF_ProcessInitFiles
fun:fontforge_main
}
{
ff_pyinit_embedded_python_value8_1
Memcheck:Value8
obj:*/libpython3.*.so.*
...
fun:_Py_InitializeEx_Private
fun:FontForge_InitializeEmbeddedPython
fun:fontforge_main
}
{
ff_pyinit_embedded_python_value8_2
Memcheck:Value8
obj:*/libpython3.*.so.*
...
fun:LoadFilesInPythonInitDir
fun:PyFF_ProcessInitFiles
fun:fontforge_main
}
{
ff_pyinit_embedded_python_leak_1
Memcheck:Leak
match-leak-kinds: definite,possible
fun:malloc
...
fun:_Py_InitializeEx_Private
}
{
ff_pyinit_embedded_python_leak_2
Memcheck:Leak
match-leak-kinds: definite,possible
fun:malloc
...
fun:FontForge_InitializeEmbeddedPython
fun:fontforge_main
}
# - - - - - - - - - - - - - - - - - - - - - - - -
{
ff_pyimport_malloc_leak_1
Memcheck:Leak
match-leak-kinds: definite,possible
fun:malloc
...
fun:PyObject_Call
fun:_PyObject_CallMethodIdObjArgs
fun:PyImport_ImportModuleLevelObject
}
{
ff_pyimport_malloc_leak_2
Memcheck:Leak
match-leak-kinds: definite,possible
fun:malloc
...
fun:PyImport_ImportFrozenModuleObject
}
# - - - - - - - - - - - - - - - - - - - - - - - -
{
ff_pyfinal_embedded_python_addr4_1
Memcheck:Addr4
obj:*/libpython3.*.so.*
...
fun:Py_Finalize
fun:FontForge_FinalizeEmbeddedPython
}
{
ff_pyfinal_embedded_python_value8_1
Memcheck:Value8
obj:*/libpython3.*.so.*
...
fun:Py_Finalize
fun:FontForge_FinalizeEmbeddedPython
fun:fontforge_main
}
{
ff_pyfinal_embedded_python_cond_1
Memcheck:Cond
obj:*/libpython3.*.so.*
...
fun:Py_Finalize
fun:FontForge_FinalizeEmbeddedPython
fun:fontforge_main
}
{
ff_pyfinal_embedded_python_cond_2
Memcheck:Cond
obj:*/libpython3.*.so.*
...
fun:_Py_InitializeEx_Private
fun:FontForge_FinalizeEmbeddedPython
fun:fontforge_main
}
# - - - - - - - - - - - - - - - - - - - - - - - -
{
ff_pyeval_addr4_1
Memcheck:Addr4
obj:*/libpython3.*.so.*
fun:_PyBytes_Resize
...
fun:PyEval_EvalFrameEx
fun:PyEval_EvalCodeEx
}
{
ff_pyeval_addr4_2
Memcheck:Addr4
obj:*/libpython3.*.so.*
obj:*/libpython3.*.so.*
...
fun:PyEval_EvalFrameEx
fun:PyEval_EvalCodeEx
obj:*/libpython3.*.so.*
}
{
ff_pyeval_cond_1
Memcheck:Cond
obj:*/libpython3.*.so.*
...
fun:PyEval_EvalFrameEx
fun:PyEval_EvalCodeEx
}
{
ff_pyeval_value8_1
Memcheck:Value8
obj:*/libpython3.*.so.*
fun:_PyBytes_Resize
...
fun:PyEval_EvalFrameEx
fun:PyEval_EvalCodeEx
}
{
ff_pyeval_value8_2
Memcheck:Value8
obj:*/libpython3.*.so.*
...
fun:PyEval_EvalFrameEx
fun:PyEval_EvalCodeEx
}
# - - - - - - - - - -
{
ff_pyeval_malloc_leak_1
Memcheck:Leak
match-leak-kinds: definite,possible
fun:malloc
...
fun:PyEval_EvalFrameEx
}
{
ff_pyeval_malloc_leak_2
Memcheck:Leak
match-leak-kinds: definite,possible
fun:malloc
...
fun:PyEval_EvalCodeEx
...
fun:PyObject_Call
}
{
ff_pyeval_realloc_leak_1
Memcheck:Leak
match-leak-kinds: definite,possible
fun:realloc
...
fun:PyEval_EvalFrameEx
}
{
ff_pyeval_realloc_leak_2
Memcheck:Leak
match-leak-kinds: definite,possible
fun:realloc
...
fun:PyObject_Call
}
# - - - - - - - - - - - - - - - - - - - - - - - -
{
ff_py_malloc_lib_leak_1
Memcheck:Leak
match-leak-kinds: definite,possible
fun:malloc
fun:PyObject_Malloc
...
fun:PyTuple_*
...
obj:*/libpython3.*.so.*
}
{
ff_py_malloc_lib_leak_2
Memcheck:Leak
match-leak-kinds: definite,possible
fun:malloc
fun:PyObject_Malloc
...
fun:_PySys_Init
}
{
ff_py_malloc_lib_leak_3
Memcheck:Leak
match-leak-kinds: definite,possible
fun:malloc
fun:PyObject_Malloc
...
fun:PyUnicode_Decode*
obj:*/libpython3.*.so.*
}
{
ff_py_malloc_lib_leak_4
Memcheck:Leak
match-leak-kinds: definite,possible
fun:malloc
fun:PyObject_Malloc
...
fun:PyBytes_FromStringAndSize
obj:*/libpython3.*.so.*
}
{
ff_py_malloc_lib_leak_5
Memcheck:Leak
match-leak-kinds: definite,possible
fun:malloc
fun:PyObject_Malloc
...
fun:_PyLong_New
obj:*/libpython3.*.so.*
}
{
ff_py_malloc_lib_leak_6
Memcheck:Leak
match-leak-kinds: definite,possible
fun:malloc
fun:PyObject_Malloc
...
fun:PyCode_New
obj:*/libpython3.*.so.*
}
{
ff_py_malloc_lib_leak_7
Memcheck:Leak
match-leak-kinds: definite,possible
fun:malloc
obj:*/libpython3.*.so.*
...
fun:PyUnicode_InternInPlace
obj:*/libpython3.*.so.*
}
{
ff_pyast_malloc_leak_1
Memcheck:Leak
match-leak-kinds: definite,possible
fun:malloc
fun:PyObject_Malloc
...
fun:PyAST_CompileEx
}
{
ff_pyast_malloc_leak_2
Memcheck:Leak
match-leak-kinds: definite,possible
fun:malloc
obj:*/libpython3.*.so.*
...
fun:PyAST_Check
}
# - - - - - - - - - - - - - - - - - - - - - - - -
{
ff_pyobject_callmethod_addr4_1
Memcheck:Addr4
obj:*/libpython3.*.so.*
...
fun:PyEval_EvalFrameEx
...
fun:PyObject_Call
fun:_PyObject_CallMethodIdObjArgs
}
# - - - - - - - - - - - - - - - - - - - - - - - -
{
ff_dlinit_calloc_leak_1
Memcheck:Leak
match-leak-kinds: definite,possible
fun:calloc
fun:g_malloc0
...
obj:*/libgobject-2.0.so.*
fun:call_init.part.0
fun:_dl_init
obj:*/ld-2.*.so
}
{
ff_dlinit_malloc_leak_1
Memcheck:Leak
match-leak-kinds: definite,possible
fun:malloc
fun:realloc
...
obj:*/libgobject-2.0.so.*
fun:call_init.part.0
fun:_dl_init
obj:*/ld-2.*.so
}
{
ff_dlinit_realloc_leak_1
Memcheck:Leak
match-leak-kinds: definite,possible
fun:realloc
fun:g_realloc
...
obj:*/libgobject-2.0.so.*
fun:call_init.part.0
fun:_dl_init
obj:*/ld-2.*.so
}
@tshinnic
Copy link
Author

tshinnic commented Aug 2, 2014

I've been running with

valgrind --suppressions=valgrind_ff_pango.supp --suppressions=valgrind_ff_p3.supp --log-file=valgrind -v --leak-check=full --track-origins=yes --gen-suppressions=all fontforge 

but for less output you might want

valgrind --suppressions=valgrind_ff_pango.supp --suppressions=valgrind_ff_p3.supp --log-file=valgrind --leak-check=full --track-origins=yes fontforge 

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