From 2365f265b14836a0ac9332d00a0a0edeade255ad Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 5 Apr 2021 16:14:10 +0800 Subject: [PATCH] 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 --- src/tools/ceph-dencoder/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tools/ceph-dencoder/CMakeLists.txt b/src/tools/ceph-dencoder/CMakeLists.txt index dd5541cd93e91..5989e58a6973c 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) -- 2.39.5