You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following program will with high probability segfault/hit an assertion on latest main (f11f711):
#include <exec/async_scope.hpp>
#include <exec/static_thread_pool.hpp>
#include <stdexec/execution.hpp>
int main() {
exec::static_thread_pool pool{4};
auto sched = pool.get_scheduler();
for (std::size_t i = 0; i < 100; ++i) {
// both start_detaching work...
for (std::size_t j = 0; j < 10; ++j) {
auto s = stdexec::schedule(sched) | stdexec::split();
for (std::size_t k = 0; k < 10; ++k) {
stdexec::start_detached(s);
}
// s requests stop
}
// ... as well as async_scope-ing work triggers the issue
// exec::async_scope scope;
// for (std::size_t j = 0; j < 10; ++j) {
// auto s = stdexec::schedule(sched) | stdexec::split();
// for (std::size_t k = 0; k < 10; ++k) {
// scope.spawn(s);
// }
// // s requests stop
// }
// stdexec::sync_wait(scope.on_empty());
}
}
(If it doesn't fail the first time, rerun or increase the number of iterations.)
It will typically fail with either a segfault or with assertions enabled it'll report:
The following program will with high probability segfault/hit an assertion on latest main (f11f711):
(If it doesn't fail the first time, rerun or increase the number of iterations.)
It will typically fail with either a segfault or with assertions enabled it'll report:
With thread sanitizer it may report the following (or a segfault):
Compiler explorer reproducer: https://compiler-explorer.com/z/4TGo8o67c.
The text was updated successfully, but these errors were encountered: