[Bug c++/95111] coroutines use-after-free with lambdas

avi@cloudius-systems.com gcc-bugzilla@gcc.gnu.org
Thu May 14 11:15:57 GMT 2020


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

--- Comment #11 from Avi Kivity <avi@cloudius-systems.com> ---
I started a conversation on the std-proposals list about this.

Meanwhile, how about a -fnonstandard-coroutines-that-actually-work flag that
captures the parameter to a non-static member function coroutine by value, if
it is an rvalue when the call happens? Without it, lambda coroutines are
useless for asynchronous coroutines.


More information about the Gcc-bugs mailing list