From: Kefu Chai Date: Sun, 24 Mar 2024 16:15:15 +0000 (+0800) Subject: qa/lsan.supp: suppress MallocExtension::Initialize X-Git-Tag: v20.0.0~2279^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F56241%2Fhead;p=ceph.git qa/lsan.supp: suppress MallocExtension::Initialize LeakSanitizer reports ``` ==688591==ERROR: LeakSanitizer: detected memory leaks Direct leak of 45 byte(s) in 1 object(s) allocated from: #0 0x55f8dd9969dd in operator new(unsigned long) (/home/jenkins-build/build/workspace/ceph-pull-requests/build/bin/unittest_fastbmap_allocator+0x1f89dd) (BuildId: cac39eac8ef1e8774f9dd48e6e3f677fdd864776) #1 0x55f8dd99c730 in __gnu_cxx::new_allocator::allocate(unsigned long, void const*) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/ext/new_allocator.h:127:27 #2 0x55f8dd99c690 in std::allocator::allocate(unsigned long) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/allocator.h:185:32 #3 0x55f8dd99c690 in std::allocator_traits >::allocate(std::allocator&, unsigned long) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/alloc_traits.h:464:20 #4 0x55f8dd99c393 in std::__cxx11::basic_string, std::allocator >::_M_create(unsigned long&, unsigned long) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/basic_string.tcc:153:14 #5 0x55f8dda96a6c in std::__cxx11::basic_string, std::allocator >::_M_mutate(unsigned long, unsigned long, char const*, unsigned long) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/basic_string.tcc:307:21 #6 0x55f8dda96852 in std::__cxx11::basic_string, std::allocator >::_M_append(char const*, unsigned long) /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/basic_string.tcc:395:8 #7 0x7f4a751ab6f0 in MallocExtension::Initialize() (/lib/x86_64-linux-gnu/libtcmalloc.so.4+0x2a6f0) (BuildId: eeef3d1257388a806e122398dbce3157ee568ef4) ``` this is a global object allocated by the allocator, so we can suppress this report. Signed-off-by: Kefu Chai --- diff --git a/qa/lsan.supp b/qa/lsan.supp index f63c4cf0e1e47..c7d6cf59ed113 100644 --- a/qa/lsan.supp +++ b/qa/lsan.supp @@ -3,6 +3,9 @@ # LSAN_OPTIONS="suppressions=../qa/lsan.supp" # export ASAN_OPTIONS="detect_odr_violation=0" +# gperftools allocates a singleton of MallocExtension and never frees it +leak:^MallocExtension::Initialize + # from perfglue/heap_profiler.cc # gperftools allocates a singleton and never frees it leak:^InitModule