From: Matt Benjamin Date: Wed, 1 Nov 2023 17:16:46 +0000 (-0400) Subject: rgw: link only radosgw with ALLOC_LIBS X-Git-Tag: v19.0.0~48^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c4b4ba554d285d9342cf16e4ce6782f18bd405ce;p=ceph-ci.git rgw: link only radosgw with ALLOC_LIBS In particular, do not link intermediate dependencies nor librgw.so.2 with a custom allocator (normally tcmalloc). This prevents illegal behavior due to mismatched allocators when run under nfs-ganesha or other consumers. Fixes: https://tracker.ceph.com/issues/63394 Signed-off-by: Matt Benjamin --- diff --git a/src/rgw/CMakeLists.txt b/src/rgw/CMakeLists.txt index 9b55081dbaa..e4ff8c9199b 100644 --- a/src/rgw/CMakeLists.txt +++ b/src/rgw/CMakeLists.txt @@ -279,7 +279,6 @@ target_link_libraries(rgw_common ${ARROW_LIBRARIES} ${ARROW_FLIGHT_LIBRARIES} ${LMDB_LIBRARIES} - ${ALLOC_LIBS} PUBLIC ${LUA_LIBRARIES} RapidJSON::RapidJSON @@ -459,7 +458,12 @@ target_include_directories(radosgw target_include_directories(radosgw SYSTEM PUBLIC "../rapidjson/include") -target_link_libraries(radosgw PRIVATE ${rgw_libs} rgw_schedulers kmip) +target_link_libraries(radosgw PRIVATE + ${rgw_libs} + rgw_schedulers + kmip + ${ALLOC_LIBS}) + if(WITH_RADOSGW_BEAST_OPENSSL) # used by rgw_asio_frontend.cc target_link_libraries(radosgw PRIVATE OpenSSL::SSL) @@ -509,7 +513,7 @@ set(radosgw_token_srcs rgw_token.cc) add_executable(radosgw-token ${radosgw_token_srcs}) target_link_libraries(radosgw-token librados - global ${ALLOC_LIBS}) + global) install(TARGETS radosgw-token DESTINATION bin) set(radosgw_object_expirer_srcs