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 <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2021-04-05 16:14:10 +08:00
parent 7fb0569ec3
commit 2365f265b1

View 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)