mirror of
https://github.com/ceph/ceph
synced 2025-02-17 07:57:44 +00:00
With newer clang and gcc versions (observed on clang-17.0.6 as well as gcc 12/13), asan is throwing stack-use-after-return during OSD startup related to usage of seastar::async, which relies on swapcontext internally. seastar/src/core/thread.cc supports asan's hooks, but only if SEASTAR_HAVE_ASAN_FIBER_SUPPORT is set. seastar's CMakeList.txt sets it based on Sanitizers_FIBER_SUPPORT, which probably should be set by the module at src/seastar/cmake/FindSanitizers.cmake, but that module doesn't seem to be actually invoked anywhere. Ceph's version of that module (cmake/modules/FindSanitizers.cmake) does not set Sanitizers_FIBER_SUPPORT. This commit adds that check as well as the related code snippet. Fixes: https://tracker.ceph.com/issues/64512 Signed-off-by: Samuel Just <sjust@redhat.com>
12 lines
314 B
C++
12 lines
314 B
C++
#include <cstddef>
|
|
|
|
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);
|
|
}
|