]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
asan: add qa/lsan.supp for leak sanitizer suppressions
authorCasey Bodley <cbodley@redhat.com>
Sun, 5 Mar 2023 16:58:43 +0000 (11:58 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 7 Mar 2023 18:33:57 +0000 (13:33 -0500)
any executable that links against the heap_profiler leaks 8 bytes for a
singleton:
> -----------------------------------------------------
> Suppressions used:
> count      bytes template
> 1          8 ^MallocExtension::Register
> -----------------------------------------------------

the python script bin/ceph has a lot of leaks:
> -----------------------------------------------------
> Suppressions used:
>   count      bytes template
>     205     294983 ^PyObject_Malloc
>      10       6216 ^_PyObject_Realloc
>       1        568 ^PyMem_Calloc
>       2          2 ^PyMem_Malloc
>      63      58935 ^PyUnicode_New
>      10       7294 ^_PyBytes_FromSize
>     166     149904 ^_PyObject_GC_Alloc
>       5       3360 ^_PyObject_GC_Resize
> -----------------------------------------------------

Signed-off-by: Casey Bodley <cbodley@redhat.com>
qa/lsan.supp [new file with mode: 0644]

diff --git a/qa/lsan.supp b/qa/lsan.supp
new file mode 100644 (file)
index 0000000..545e76a
--- /dev/null
@@ -0,0 +1,26 @@
+# leak suppressions needed to run vstart.sh with WITH_ASAN=ON
+# to enable, add this to the environment:
+# LSAN_OPTIONS="suppressions=../qa/lsan.supp"
+
+# from perfglue/heap_profiler.cc
+# gperftools allocates a singleton and never frees it
+leak:^MallocExtension::Register
+
+# from src/ceph.in
+# python3.6
+leak:^_PyObject_Alloc
+leak:^_PyObject_GC_Resize
+leak:^PyBytes_FromStringAndSize
+leak:^PyType_GenericAlloc
+leak:^set_table_resize
+# python3.7
+leak:^_PyObject_Realloc
+leak:^PyObject_Malloc
+# python3.8
+leak:^_PyBytes_FromSize
+leak:^_PyObject_GC_Alloc
+leak:^PyMem_Calloc
+leak:^PyUnicode_New
+# python3.9, 3.10, 3.11
+leak:^PyMem_Malloc
+# python3.12 doesn't leak anything