public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/77312] Lambda that deletes itself accesses freed memory, but only if class is templated
       [not found] <bug-77312-4@http.gcc.gnu.org/bugzilla/>
@ 2021-08-22 20:10 ` pinskia at gcc dot gnu.org
  2021-08-22 20:24 ` pinskia at gcc dot gnu.org
  2021-08-23  9:52 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-22 20:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is fixed in GCC 8:

  if (SAVE_EXPR <(struct LambdaHolder *) this> != 0B)
    {
      try
        {
          LambdaHolder<int>::~LambdaHolder (SAVE_EXPR <(struct LambdaHolder *)
this>);
        }
      finally
        {
          operator delete ((void *) SAVE_EXPR <(struct LambdaHolder *) this>,
8);
        }
    }
  else
    {
      <<< Unknown tree: void_cst >>>
    } >>>>>;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/77312] Lambda that deletes itself accesses freed memory, but only if class is templated
       [not found] <bug-77312-4@http.gcc.gnu.org/bugzilla/>
  2021-08-22 20:10 ` [Bug c++/77312] Lambda that deletes itself accesses freed memory, but only if class is templated pinskia at gcc dot gnu.org
@ 2021-08-22 20:24 ` pinskia at gcc dot gnu.org
  2021-08-23  9:52 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-22 20:24 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |8.0
         Resolution|---                         |FIXED

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/77312] Lambda that deletes itself accesses freed memory, but only if class is templated
       [not found] <bug-77312-4@http.gcc.gnu.org/bugzilla/>
  2021-08-22 20:10 ` [Bug c++/77312] Lambda that deletes itself accesses freed memory, but only if class is templated pinskia at gcc dot gnu.org
  2021-08-22 20:24 ` pinskia at gcc dot gnu.org
@ 2021-08-23  9:52 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2021-08-23  9:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed by r251433 "Reimplement handling of lambdas in templates."

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-23  9:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-77312-4@http.gcc.gnu.org/bugzilla/>
2021-08-22 20:10 ` [Bug c++/77312] Lambda that deletes itself accesses freed memory, but only if class is templated pinskia at gcc dot gnu.org
2021-08-22 20:24 ` pinskia at gcc dot gnu.org
2021-08-23  9:52 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).