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

            Bug ID: 98432
           Summary: [coroutine] leaked frame created using await_transform
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hering.t at seznam dot cz
  Target Milestone: ---

I think I encounter a memory leak caused by implementation when using
await_transform to turn arbitrary type into awaitable. I track the number of
(internally) allocated coroutine frames and expect to see zero as the final
figure, one remains unfreed however.

cmd line: g++.exe gcc_coro_leak.cpp -std=c++20 -O3 -Wall -Wextra -fcoroutines

Platforms tested: avr, x86

Compilation output: 
returned: 0

Execution output:
allocating frame, total count:
1
allocating frame, total count:
2
hello coro-world
deleting frame, remaining count:
1

Program returned: 0

Reply via email to