Skip to content

Commit 880029e

Browse files
committed
CI fixes
- Temp workaround for relacy to compile in CI - Do not build Relacy tests with sanitizers by default
1 parent 0e9451c commit 880029e

2 files changed

Lines changed: 25 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,17 @@ endif()
152152

153153
# Build relacy tests by default only for GNU compiler and if tests are enabled
154154
# It will take work to get other platforms to work in the future.
155-
if(${STDEXEC_BUILD_TESTS} AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
156-
set(STDEXEC_BUILD_RELACY_TESTS_DEFAULT ON)
155+
# Additionally, do not build the Relacy tests when a sanitizer is active. TSAN
156+
# doesn't do anything since Relacy simulates threads with fibers anyway. Relacy
157+
# has primtive (compared to ASAN) use-after-free detection which doesn't compose
158+
# with ASAN.
159+
if(
160+
${STDEXEC_BUILD_TESTS} AND
161+
CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND
162+
NOT CMAKE_CXX_FLAGS MATCHES "-fsanitize")
163+
set(STDEXEC_BUILD_RELACY_TESTS_DEFAULT ON)
157164
else()
158-
set(STDEXEC_BUILD_RELACY_TESTS_DEFAULT OFF)
165+
set(STDEXEC_BUILD_RELACY_TESTS_DEFAULT OFF)
159166
endif()
160167
option(STDEXEC_BUILD_RELACY_TESTS "Build stdexec relacy tests" ${STDEXEC_BUILD_RELACY_TESTS_DEFAULT})
161168

test/rrd/shared_mutex

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Temporary workaround until upstream Relacy provides a fakestd header for shared_mutex
2+
// stdexec pulls in shared_mutex through TBB,
3+
// In file included from /usr/include/c++/13/shared_mutex:42,
4+
// from /usr/include/c++/13/memory_resource:62,
5+
// from /usr/include/oneapi/tbb/cache_aligned_allocator.h:26,
6+
// from /usr/include/oneapi/tbb/partitioner.h:46,
7+
// from /usr/include/oneapi/tbb/parallel_for.h:27,
8+
// from /usr/include/tbb/parallel_for.h:17,
9+
// from /usr/include/c++/13/pstl/parallel_backend_tbb.h:20,
10+
// from /usr/include/c++/13/pstl/parallel_backend.h:20,
11+
// from /usr/include/c++/13/pstl/algorithm_impl.h:22,
12+
// from /usr/include/c++/13/pstl/glue_execution_defs.h:50,
13+
// from /usr/include/c++/13/execution:34,
14+
// from /home/coder/stdexec/test/rrd/../../include/exec/../stdexec/__detail/__execution_legacy.hpp:21,
15+
#pragma once

0 commit comments

Comments
 (0)