Skip to content

Commit

Permalink
cmake: remove util.cc from lib{rados,cephfs},ceph-objectstore-tool
Browse files Browse the repository at this point in the history
util.cc is included by both librados and libcephfs, the `lvm` static
variable in `lsb_release_parse()` will be free twice by them. this
could lead to double free issue. and util.cc is not used by client at all, so
remove it from them.

Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed Jul 19, 2016
1 parent 741f990 commit 3173d2e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -748,8 +748,7 @@ add_library(parse_secret_objs OBJECT ${parse_secret_files})
if(WITH_LIBCEPHFS)
add_subdirectory(client)
set(libcephfs_srcs libcephfs.cc)
add_library(cephfs ${CEPH_SHARED} ${libcephfs_srcs}
$<TARGET_OBJECTS:common_util_obj>)
add_library(cephfs ${CEPH_SHARED} ${libcephfs_srcs})
target_link_libraries(cephfs LINK_PRIVATE client
${CRYPTO_LIBS} ${EXTRALIBS})
if(ENABLE_SHARED)
Expand Down
1 change: 0 additions & 1 deletion src/librados/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ add_library(librados_objs OBJECT
RadosClient.cc)
add_library(librados ${CEPH_SHARED}
librados.cc
$<TARGET_OBJECTS:common_util_obj>
$<TARGET_OBJECTS:librados_objs>)
add_dependencies(librados osdc)
if(WITH_LTTNG)
Expand Down
3 changes: 1 addition & 2 deletions src/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ install(PROGRAMS

add_executable(ceph-objectstore-tool
ceph_objectstore_tool.cc
RadosDump.cc
$<TARGET_OBJECTS:common_util_obj>)
RadosDump.cc)
target_link_libraries(ceph-objectstore-tool osd os global ${Boost_PROGRAM_OPTIONS_LIBRARY} ${CMAKE_DL_LIBS} fuse)
install(TARGETS ceph-objectstore-tool DESTINATION bin)

Expand Down

0 comments on commit 3173d2e

Please sign in to comment.