From: Jason Dillaman Date: Fri, 28 Jun 2019 14:50:22 +0000 (-0400) Subject: cmake: boost valgrind fixes for boost::lockfree::queue X-Git-Tag: v15.1.0~2336^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b5955682185439fbd9697c55c6e44fd59031de72;p=ceph.git cmake: boost valgrind fixes for boost::lockfree::queue The issue has been fixed upstream under lockfree commit 7e23dac52d08ed1a099de9a6fb8bcdefbb06d2da but is not yet available in a boost release. Signed-off-by: Jason Dillaman --- diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake index 92ba07be1c72..97aed8685eba 100644 --- a/cmake/modules/BuildBoost.cmake +++ b/cmake/modules/BuildBoost.cmake @@ -163,7 +163,9 @@ function(do_build_boost version) include(ExternalProject) ExternalProject_Add(Boost ${source_dir} - PATCH_COMMAND patch -d -p1 < ${CMAKE_MODULE_PATH}/boost_context_asm_arm_syntax_unified.patch + PATCH_COMMAND + patch -d -p1 < ${CMAKE_MODULE_PATH}/boost_context_asm_arm_syntax_unified.patch && + patch -d -p1 < ${CMAKE_MODULE_PATH}/boost_lockfree_queue_valgrind_error.patch CONFIGURE_COMMAND CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ${configure_command} BUILD_COMMAND CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ${build_command} BUILD_IN_SOURCE 1 diff --git a/cmake/modules/boost_lockfree_queue_valgrind_error.patch b/cmake/modules/boost_lockfree_queue_valgrind_error.patch new file mode 100644 index 000000000000..17d9e1674104 --- /dev/null +++ b/cmake/modules/boost_lockfree_queue_valgrind_error.patch @@ -0,0 +1,11 @@ +--- a/boost/lockfree/queue.hpp ++++ b/boost/lockfree/queue.hpp +@@ -108,7 +108,7 @@ + typedef typename detail::select_tagged_handle::handle_type handle_type; + + node(T const & v, handle_type null_handle): +- data(v)//, next(tagged_node_handle(0, 0)) ++ next(tagged_node_handle(null_handle, 0)), data(v) + { + /* increment tag to avoid ABA problem */ + tagged_node_handle old_next = next.load(memory_order_relaxed);