From: Kefu Chai Date: Mon, 5 Apr 2021 08:14:10 +0000 (+0800) Subject: tools/ceph-dencoder: link against libtcmalloc X-Git-Tag: v17.1.0~2366^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2365f265b14836a0ac9332d00a0a0edeade255ad;p=ceph.git tools/ceph-dencoder: link against libtcmalloc to address the failure like src/tcmalloc.cc:332] Attempt to free invalid pointer 0x5627da496130 Aborted we need to link and load libtcmalloc before it is loaded by a shared library, otherwise the memory chunk allocated by libc will be freed by tcmalloc after it is loaded. Signed-off-by: Kefu Chai --- diff --git a/src/tools/ceph-dencoder/CMakeLists.txt b/src/tools/ceph-dencoder/CMakeLists.txt index dd5541cd93e9..5989e58a6973 100644 --- a/src/tools/ceph-dencoder/CMakeLists.txt +++ b/src/tools/ceph-dencoder/CMakeLists.txt @@ -100,5 +100,6 @@ target_link_libraries(ceph-dencoder cls_user_client cls_cas_client ${EXTRALIBS} - ${CMAKE_DL_LIBS}) + ${CMAKE_DL_LIBS} + ${ALLOC_LIBS}) install(TARGETS ceph-dencoder DESTINATION bin)