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: "redi 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 17:09:20 +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 #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #5)
> Inside a lambda where XYZ is captured? Do we need to read from the closure
> twice, once for the deconstructor and then again for the call to delete.
I don't see why that should be necessary.