Skip to content

make_delegate_with_shared_state uses an object after it was moved #1252

@yuvaln-s1

Description

@yuvaln-s1

The function make_delegate_with_shared_state (from strings/base_coroutine_foundation.h) uses on object after it was moved.
The last line in the function is:
return { std::move(d), reinterpret_cast<delegate<T, H>*>(get_abi(d)) };
'd' is moved using std::move and then it's passed to get_abi. The usage of 'd' after it was moved it undefined.

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