Skip to content

Minimal stdexec::task sample crashes on windows #1962

@maxbachmann

Description

@maxbachmann
static inline stdexec::task<void> task()
{
    co_return;
}

stdexec::sync_wait(task());

crashes on windows (msvc). The crash occurs in:

static constexpr auto await_suspend(__std::coroutine_handle<__promise> __coro) noexcept  //
    -> __std::coroutine_handle<>
{
    return __coro.promise().__state_->__completed();
}

with an access violation error. Using exec::task for the same sample doesn't crash.

It's worth noting that we had the opposite problem on a different x64 target (proprietary platform using a clang fork) where this sample would only crash for exec::task but not for stdexec::task. I didn't report this back then since stdexec::task fixed the issue and I wasn't able to reproduce the crash on other targets. There the crash was attributes as a general protection fault in static auto __co_impl when running co_await static_cast<_Awaitable&&>(__awaitable)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions