https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95111

--- Comment #10 from Avi Kivity <a...@cloudius-systems.com> ---
Well, the standard is useless here.

In

    [foo] () -> lazy<foo> { co_return foo; } ()

a temporary is clearly passed to the lambda body, yet the standard mandates
that we capture it by reference. As a result, a use-after-free is guaranteed.

Reply via email to