This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77312] Lambda that deletes itself accesses freed memory, but only if class is templated
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 22 Aug 2016 07:10:00 +0000
- Subject: [Bug c++/77312] Lambda that deletes itself accesses freed memory, but only if class is templated
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-77312-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77312
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I don't see why you think this is valid thing to do.
You are in a function which calls delete on the object you are in currently.
That seems like this code is broken.