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

iains at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed May 13 19:12:37 GMT 2020


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

--- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> ---
There are some gotchas with coroutines and references (both regular and
rvalue).

* there could still be a bug here, so I want to double-check.

Please could you expand your snippets of code into a small test-case that would
would expect to work?

(FWIW, in my original impl. I tried to be more defensive about lambda captures
- but that wasn't correct in the presence of a mutable lambda - and didn't
agree with other implementations - or the collective understanding of the
intent of the standard - so I backed that out).


More information about the Gcc-bugs mailing list