Skip to content

Commit ba6ef88

Browse files
authored
drop support for gcc-11 (#1987)
* drop support for gcc-11 * do not run sanitizers on relacy tests * test gcc-14 release ASAN instead of gcc-12 * turn off -Wmaybe-uninitialized for tests when compiling with gcc * avoid symmetric transfer on GCC
1 parent 0646567 commit ba6ef88

File tree

14 files changed

+54
-26
lines changed

14 files changed

+54
-26
lines changed

.github/workflows/ci.cpu.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@ jobs:
2424
- { name: "CPU (clang 16, Debug, TSAN)", build: "Debug", tag: llvm16-cuda12.9, cxxstd: "20", cxxflags: "-fsanitize=thread" }
2525
- { name: "CPU (clang 16, Release)", build: "Release", tag: llvm16-cuda12.9, cxxstd: "20", cxxflags: "-stdlib=libc++" }
2626
- { name: "CPU (clang 16, Release, ASAN)", build: "Release", tag: llvm16-cuda12.9, cxxstd: "20", cxxflags: "-stdlib=libc++ -fsanitize=address -fsanitize-ignorelist=/home/coder/stdexec/sanitizer-ignorelist.txt" }
27-
- { name: "CPU (gcc 11, Debug)", build: "Debug", tag: gcc11-cuda12.9, cxxstd: "20", cxxflags: "", }
28-
- { name: "CPU (gcc 11, Release)", build: "Release", tag: gcc11-cuda12.9, cxxstd: "20", cxxflags: "", }
29-
- { name: "CPU (gcc 11, Release, ASAN)", build: "Release", tag: gcc11-cuda12.9, cxxstd: "20", cxxflags: "-fsanitize=address" }
27+
- { name: "CPU (gcc 12, Debug)", build: "Debug", tag: gcc12-cuda12.9, cxxstd: "20", cxxflags: "", }
28+
- { name: "CPU (gcc 12, Release)", build: "Release", tag: gcc12-cuda12.9, cxxstd: "20", cxxflags: "", }
29+
# With the following config, 2 tests mysteriously time out, but only in CI and not locally.
30+
# - { name: "CPU (gcc 12, Release, ASAN)", build: "Release", tag: gcc12-cuda12.9, cxxstd: "20", cxxflags: "-fsanitize=address" }
3031
- { name: "CPU (gcc 12, Release, TSAN)", build: "Release", tag: gcc12-cuda12.9, cxxstd: "20", cxxflags: "-fsanitize=thread" }
3132
- { name: "CPU (gcc 13, Debug)", build: "Debug", tag: gcc13-cuda12.9, cxxstd: "20", cxxflags: "", }
3233
- { name: "CPU (gcc 14, Debug)", build: "Debug", tag: gcc14-cuda12.9, cxxstd: "20", cxxflags: "", }
3334
- { name: "CPU (gcc 14, Debug, ASAN)", build: "Debug", tag: gcc14-cuda12.9, cxxstd: "20", cxxflags: "-fsanitize=address" }
3435
- { name: "CPU (gcc 14, Debug, TSAN)", build: "Debug", tag: gcc14-cuda12.9, cxxstd: "20", cxxflags: "-fsanitize=thread" }
36+
- { name: "CPU (gcc 14, Release, ASAN)", build: "Release", tag: gcc14-cuda12.9, cxxstd: "20", cxxflags: "-fsanitize=address" }
3537
- { name: "CPU (gcc 14, Release, LEAK)", build: "Release", tag: gcc14-cuda12.9, cxxstd: "20", cxxflags: "-fsanitize=leak", }
3638
- { name: "CPU (gcc 14, Release, c++23)", build: "Release", tag: gcc14-cuda12.9, cxxstd: "23", cxxflags: "", }
3739
container:

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ set(BUILD_TESTING ${STDEXEC_BUILD_TESTS})
109109
if (STDEXEC_BUILD_TESTS)
110110
# CTest automatically calls enable_testing() if BUILD_TESTING is ON
111111
# https://cmake.org/cmake/help/latest/module/CTest.html#module:CTest
112+
list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure")
112113
include(CTest)
113114
endif()
114115

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ below](#nvhpc-sdk) for more details).
9797
`stdexec` requires compiling with C++20 (`-std=c++20`) but otherwise does not have any
9898
dependencies and only requires a sufficiently new compiler:
9999

100-
- gcc 11+
100+
- gcc 12+
101101
- clang 16+
102102
- MSVC 14.43+
103103
- XCode 16+

examples/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ function(def_example example)
3232
PRIVATE STDEXEC::stdexec
3333
stdexec_executable_flags
3434
$<TARGET_NAME_IF_EXISTS:TBB::tbb>)
35+
target_compile_options(${target} INTERFACE
36+
$<$<CXX_COMPILER_ID:GNU>:-Wno-maybe-uninitialized>) # warnings being emitted from stdlib headers, why?
3537
endfunction()
3638

3739
set(stdexec_examples

include/stdexec/__detail/__as_awaitable.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#include <functional> // for std::identity
3434
#include <system_error>
3535
#include <thread>
36-
#include <variant>
3736

3837
STDEXEC_PRAGMA_PUSH()
3938
STDEXEC_PRAGMA_IGNORE_GNU("-Wmissing-braces")
@@ -307,8 +306,7 @@ namespace STDEXEC
307306
}
308307

309308
constexpr auto
310-
await_suspend([[maybe_unused]] __std::coroutine_handle<_Promise> __hcoro) noexcept //
311-
-> __std::coroutine_handle<>
309+
await_suspend([[maybe_unused]] __std::coroutine_handle<_Promise> __hcoro) noexcept -> bool
312310
{
313311
STDEXEC_ASSERT(this->__continuation_ == __hcoro);
314312

@@ -330,14 +328,14 @@ namespace STDEXEC
330328
// The operation completed inline with set_value or set_error, so we can just
331329
// resume the current coroutine. await_resume will either return the value or
332330
// throw as appropriate.
333-
return __hcoro;
331+
return false;
334332
}
335333
else
336334
{
337335
// If __ready_ was still false when executing the CAS, then the operation did not
338336
// complete inline. The continuation will be resumed when the operation
339337
// completes, so we return a noop_coroutine to suspend the current coroutine.
340-
return __std::noop_coroutine();
338+
return true;
341339
}
342340
}
343341

@@ -363,7 +361,7 @@ namespace STDEXEC
363361
{}
364362

365363
auto await_suspend([[maybe_unused]] __std::coroutine_handle<_Promise> __hcoro)
366-
-> __std::coroutine_handle<>
364+
-> STDEXEC_PP_IF(STDEXEC_GCC(), bool, __std::coroutine_handle<>)
367365
{
368366
STDEXEC_ASSERT(this->__continuation_ == __hcoro);
369367
{
@@ -379,14 +377,16 @@ namespace STDEXEC
379377
// unhandled_stopped() on the promise to propagate the stop signal. That will
380378
// result in the coroutine being torn down, so beware. We then resume the
381379
// returned coroutine handle (which may be a noop_coroutine).
382-
return __hcoro.promise().unhandled_stopped();
380+
return STDEXEC_PP_IF(STDEXEC_GCC(),
381+
(__hcoro.promise().unhandled_stopped().resume(), true),
382+
__hcoro.promise().unhandled_stopped());
383383
}
384384
else
385385
{
386386
// The operation completed with set_value or set_error, so we can just resume
387387
// the current coroutine. await_resume will either return the value or throw as
388388
// appropriate.
389-
return __hcoro;
389+
return STDEXEC_PP_IF(STDEXEC_GCC(), false, __hcoro);
390390
}
391391
}
392392

include/stdexec/__detail/__task.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,17 @@ namespace STDEXEC
252252
return __attrs{};
253253
}
254254

255+
# if !STDEXEC_GCC()
256+
// This transforms a task into an __awaiter that can perform symmetric transfer when
257+
// co_awaited. It is disabled on GCC due to
258+
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94794, which causes unbounded stack
259+
// growth.
255260
template <class _ParentPromise>
256261
constexpr auto as_awaitable(_ParentPromise& __parent) && noexcept
257262
{
258263
return __awaiter<_ParentPromise>(static_cast<task&&>(*this), __parent);
259264
}
265+
# endif
260266

261267
private:
262268
using __on_stopped_t = __forward_stop_request<stop_source_type>;

test/CMakeLists.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ set_target_properties(common_test_settings PROPERTIES
8888
target_include_directories(common_test_settings INTERFACE "${CMAKE_CURRENT_LIST_DIR}")
8989
target_compile_definitions(common_test_settings INTERFACE STDEXEC_NAMESPACE=std::execution)
9090
target_compile_options(common_test_settings INTERFACE
91-
$<$<CXX_COMPILER_ID:MSVC>:/wd4714>) # function marked as __forceinline not inlined
91+
$<$<CXX_COMPILER_ID:MSVC>:/wd4714> # function marked as __forceinline not inlined
92+
$<$<CXX_COMPILER_ID:GNU>:-Wno-maybe-uninitialized> # warnings being emitted from stdlib headers, why?
93+
)
9294
target_link_libraries(common_test_settings INTERFACE $<TARGET_NAME_IF_EXISTS:TBB::tbb>)
9395
# target_compile_definitions(
9496
# common_test_settings INTERFACE
@@ -133,10 +135,12 @@ include(${Catch2_SOURCE_DIR}/contrib/Catch.cmake)
133135
# For testing that builds fail as expected
134136
include(${icm_SOURCE_DIR}/icm_build_failure_testing.cmake)
135137

136-
catch_discover_tests(test.stdexec)
137-
catch_discover_tests(test.scratch)
138+
catch_discover_tests(test.stdexec PROPERTIES TIMEOUT 30)
139+
140+
catch_discover_tests(test.scratch PROPERTIES TIMEOUT 30)
141+
138142
if(STDEXEC_BUILD_SYSTEM_CONTEXT AND NOT STDEXEC_ENABLE_CUDA)
139-
catch_discover_tests(test.system_context_replaceability)
143+
catch_discover_tests(test.system_context_replaceability PROPERTIES TIMEOUT 30)
140144
endif()
141145

142146
add_subdirectory(exec)

test/exec/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ target_link_libraries(test.exec
7777
common_test_settings)
7878

7979
# Discover the Catch2 test built by the application
80-
catch_discover_tests(test.exec)
80+
catch_discover_tests(test.exec PROPERTIES TIMEOUT 30)
8181

8282
if(STDEXEC_ENABLE_ASIO)
8383
add_subdirectory(asio)

test/exec/asio/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ target_link_libraries(test.asioexec
3131
PRIVATE
3232
common_test_settings)
3333

34-
catch_discover_tests(test.asioexec)
34+
catch_discover_tests(test.asioexec PROPERTIES TIMEOUT 30)

test/exec/taskflow/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ target_link_libraries(test.taskflowexec
2929
PRIVATE
3030
common_test_settings)
3131

32-
catch_discover_tests(test.taskflowexec)
32+
catch_discover_tests(test.taskflowexec PROPERTIES TIMEOUT 30)

0 commit comments

Comments
 (0)