NVIDIA / NVIDIA/stdexec

Asan build fails

Open
#2,094 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
2.4k
Forks
270
Avg merge
3d 6h
Merged PRs (30d)
39

Description

I am running into the following built issue in our code base just with asan enabled on gcc:

common.h:81:25: error: no match for call to '(const experimental::execution::start_detached_t) (std::remove_reference<stdexec::{anonymous}::__sexpr<<lambda closure object>stdexec::<lambda()>()>&>::type)'
   81 |     exec::start_detached(std::move(finalSender));
      |     ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ong_test/build/debug/src/database/common.h:11:
  • there are 2 candidates
    install/debug/vendor/include/exec/start_detached.hpp:203:10:
      203 |   struct start_detached_t
          |          ^~~~~~~~~~~~~~~~
    • candidate 1: 'template<class _Sender>  requires (sender_in<_Sender, stdexec::__env::__root_env>) && (__callable<stdexec::apply_sender_t, typename stdexec::__i<_Ok<typename stdexec::__i<_Ok<stdexec::__detail::__if_<__minvocable_q<stdexec::__completion_domain_of_t, stdexec::set_value_t, _Sender, stdexec::env<stdexec::__env::__root_env, stdexec::__env::__fwd<stdexec::__env::__root_env> > > >, stdexec::__q<stdexec::__completion_domain_of_t>, stdexec::__mconst<stdexec::indeterminate_domain<> > > >::__f<stdexec::__detail::__if_<__minvocable_q<stdexec::__completion_domain_of_t, stdexec::set_value_t, _Sender, stdexec::env<stdexec::__env::__root_env, stdexec::__env::__fwd<stdexec::__env::__root_env> > > >, stdexec::__q<stdexec::__completion_domain_of_t>, stdexec::__mconst<stdexec::indeterminate_domain<> > >, stdexec::set_value_t, _Sender, stdexec::env<stdexec::__env::__root_env, stdexec::__env::__fwd<stdexec::__env::__root_env> > > >::__f<typename stdexec::__i<_Ok<stdexec::__detail::__if_<__minvocable_q<stdexec::__completion_domain_of_t, stdexec::set_value_t, _Sender, stdexec::env<stdexec::__env::__root_env, stdexec::__env::__fwd<stdexec::__env::__root_env> > > >, stdexec::__q<stdexec::__completion_domain_of_t>, stdexec::__mconst<stdexec::indeterminate_domain<> > > >::__f<stdexec::__detail::__if_<__minvocable_q<stdexec::__completion_domain_of_t, stdexec::set_value_t, _Sender, stdexec::env<stdexec::__env::__root_env, stdexec::__env::__fwd<stdexec::__env::__root_env> > > >, stdexec::__q<stdexec::__completion_domain_of_t>, stdexec::__mconst<stdexec::indeterminate_domain<> > >, stdexec::set_value_t, _Sender, stdexec::env<stdexec::__env::__root_env, stdexec::__env::__fwd<stdexec::__env::__root_env> > >, experimental::execution::start_detached_t, _Sender>) void experimental::execution::start_detached_t::operator()(_Sender&&) const'
      install/debug/vendor/include/exec/start_detached.hpp:226:10:
        226 |     void operator()(_Sender&& __sndr) const
            |          ^~~~~~~~
      • substitution of deduced template arguments resulted in errors seen above
    • candidate 2: 'template<class _Env, class _Sender>  requires (sender_in<_Sender, decltype(((const stdexec::__env::__as_root_env_fn&)&stdexec::__as_root_env)((__declval<_Env>)()))>) && (__callable<stdexec::apply_sender_t, typename stdexec::__i<_Ok<typename stdexec::__i<_Ok<stdexec::__detail::__if_<__minvocable_q<stdexec::__completion_domain_of_t, stdexec::set_value_t, _Sender, decltype(((const stdexec::__env::__as_root_env_fn&)&stdexec::__as_root_env)((__declval<decltype(((const stdexec::__env::__as_root_env_fn&)&stdexec::__as_root_env)((__declval<_Env>)()))>)()))> >, stdexec::__q<stdexec::__completion_domain_of_t>, stdexec::__mconst<stdexec::indeterminate_domain<> > > >::__f<stdexec::__detail::__if_<__minvocable_q<stdexec::__completion_domain_of_t, stdexec::set_value_t, _Sender, decltype(((const stdexec::__env::__as_root_env_fn&)&stdexec::__as_root_env)((__declval<decltype(((const stdexec::__env::__as_root_env_fn&)&stdexec::__as_root_env)((__declval<_Env>)()))>)()))> >, stdexec::__q<stdexec::__completion_domain_of_t>, stdexec::__mconst<stdexec::indeterminate_domain<> > >, stdexec::set_value_t, _Sender, decltype(((const stdexec::__env::__as_root_env_fn&)&stdexec::__as_root_env)((__declval<decltype(((const stdexec::__env::__as_root_env_fn&)&stdexec::__as_root_env)((__declval<_Env>)()))>)()))> >::__f<typename stdexec::__i<_Ok<stdexec::__detail::__if_<__minvocable_q<stdexec::__completion_domain_of_t, stdexec::set_value_t, _Sender, decltype(((const stdexec::__env::__as_root_env_fn&)&stdexec::__as_root_env)((__declval<decltype(((const stdexec::__env::__as_root_env_fn&)&stdexec::__as_root_env)((__declval<_Env>)()))>)()))> >, stdexec::__q<stdexec::__completion_domain_of_t>, stdexec::__mconst<stdexec::indeterminate_domain<> > > >::__f<stdexec::__detail::__if_<__minvocable_q<stdexec::__completion_domain_of_t, stdexec::set_value_t, _Sender, decltype(((const stdexec::__env::__as_root_env_fn&)&stdexec::__as_root_env)((__declval<decltype(((const stdexec::__env::__as_root_env_fn&)&stdexec::__as_root_env)((__declval<_Env>)()))>)()))> >, stdexec::__q<stdexec::__completion_domain_of_t>, stdexec::__mconst<stdexec::indeterminate_domain<> > >, stdexec::set_value_t, _Sender, decltype(((const stdexec::__env::__as_root_env_fn&)&stdexec::__as_root_env)((__declval<decltype(((const stdexec::__env::__as_root_env_fn&)&stdexec::__as_root_env)((__declval<_Env>)()))>)()))>, experimental::execution::start_detached_t, _Sender, decltype(((const stdexec::__env::__as_root_env_fn&)&stdexec::__as_root_env)((__declval<_Env>)()))>) void experimental::execution::start_detached_t::operator()(_Sender&&, _Env&&) const'
      install/debug/vendor/include/exec/start_detached.hpp:251:10:
        251 |     void operator()(_Sender&& __sndr, _Env&& __env) const

Without enabling asan things work fine. I don't have a minimal example right now but if this can't be reproduced I can probably create one.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at common.h:81, where exec::start_detached is called, and compare the ASAN-enabled GCC build with a build without ASAN. Inspect the related overloads in vendor/include/exec/start_detached.hpp, then create or run a minimal reproduction if possible. Done means the ASAN build compiles successfully without breaking the non-ASAN build.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.