diff --git a/cmake/modules/FindSanitizers.cmake b/cmake/modules/FindSanitizers.cmake index adafc5ebe3f..bfb99821a9b 100644 --- a/cmake/modules/FindSanitizers.cmake +++ b/cmake/modules/FindSanitizers.cmake @@ -57,6 +57,9 @@ string (REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${Sanitizers_COMPILE_OPTIONS}") set(CMAKE_REQUIRED_LIBRARIES ${Sanitizers_COMPILE_OPTIONS}) check_cxx_source_compiles("int main() {}" Sanitizers_ARE_SUPPORTED) + +file (READ ${CMAKE_CURRENT_LIST_DIR}/code_tests/Sanitizers_fiber_test.cc _sanitizers_fiber_test_code) +check_cxx_source_compiles ("${_sanitizers_fiber_test_code}" Sanitizers_FIBER_SUPPORT) cmake_pop_check_state() include(FindPackageHandleStandardArgs) diff --git a/cmake/modules/code_tests/Sanitizers_fiber_test.cc b/cmake/modules/code_tests/Sanitizers_fiber_test.cc new file mode 100644 index 00000000000..9df531f2675 --- /dev/null +++ b/cmake/modules/code_tests/Sanitizers_fiber_test.cc @@ -0,0 +1,11 @@ +#include + +extern "C" { + void __sanitizer_start_switch_fiber(void**, const void*, size_t); + void __sanitizer_finish_switch_fiber(void*, const void**, size_t*); +} + +int main() { + __sanitizer_start_switch_fiber(nullptr, nullptr, 0); + __sanitizer_finish_switch_fiber(nullptr, nullptr, nullptr); +} diff --git a/src/crimson/osd/shard_services.cc b/src/crimson/osd/shard_services.cc index 604c045eb9b..8140ca3f91d 100644 --- a/src/crimson/osd/shard_services.cc +++ b/src/crimson/osd/shard_services.cc @@ -808,8 +808,8 @@ seastar::future> OSDSingletonState::build_incremental_map_msg( crimson::make_message( monc.get_fsid(), osdmap->get_encoding_features()), - [this, &first, FNAME, last](unsigned int map_message_max, - auto& m) { + [this, &first, FNAME, last](auto &map_message_max, + auto &m) { m->cluster_osdmap_trim_lower_bound = superblock.cluster_osdmap_trim_lower_bound; m->newest_map = superblock.get_newest_map(); auto maybe_handle_mapgap = seastar::now();