[Bug c++/101367] [coroutines] destructor for capture in lambda temporary operand to co_yield expression called twice

2021-08-09 Thread noah at vectorized dot io via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101367 --- Comment #5 from Noah Watkins --- Got it. Thanks for clarifying, I must have misinterpreted your earlier comment. On Mon, Aug 9, 2021 at 8:06 PM davidledger at live dot com.au wrote: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101367 >

[Bug c++/101367] [coroutines] destructor for capture in lambda temporary operand to co_yield expression called twice

2021-08-08 Thread noah at vectorized dot io via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101367 --- Comment #3 from Noah Watkins --- Happy to work on providing a different reproducer if it is helpful. This was the first smallish example we could create, and the `free of an invalid pointer error` seemed as good enough as any unexpected beha

[Bug c++/101367] [coroutines] destructor for capture in lambda temporary operand to co_yield expression called twice

2021-07-07 Thread noah at vectorized dot io via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101367 --- Comment #1 from Noah Watkins --- In the reproducer there are no errors for: generator f() { co_yield resource{[]{}}; } but `free(): invalid pointer` occurs for: generator f() { std::string s; co_yield resource{[s]{}}; }

[Bug c++/101367] New: [coroutines] destructor for capture in lambda temporary operand to co_yield expression called twice

2021-07-07 Thread noah at vectorized dot io via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101367 Bug ID: 101367 Summary: [coroutines] destructor for capture in lambda temporary operand to co_yield expression called twice Product: gcc Version: 12.0 Status: UNCONFIRME