The attached program works as expected when compiled with g++ 14 but reports leaks with both g++ 15 and 16.
Visual inspection of the generated code suggests that it’s related to replace an atomic sub in g++ 14 with a non-atomic one in g++ 15. To compile: g++ -std=c++23 -pthread frame_leak.cc =
frame_leak.cc
Description: frame_leak.cc
