]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/ceph-dencoder: link against libtcmalloc
authorKefu Chai <kchai@redhat.com>
Mon, 5 Apr 2021 08:14:10 +0000 (16:14 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 5 Apr 2021 08:30:04 +0000 (16:30 +0800)
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 <kchai@redhat.com>
src/tools/ceph-dencoder/CMakeLists.txt

index dd5541cd93e91716cb9dfcb482f727421a893e03..5989e58a6973cec252936c7d99aa5b4ed00facd0 100644 (file)
@@ -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)