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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-05-25
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I don't think this is valid:
BY the time operator delete gets called the deconstructor is called and
therefor the object no longer exists therefor:
    void operator delete (void * ptr)
    {
        if (ptr != nullptr) static_cast<IDestroyable *>(ptr)->Destroy();
    }

Is invalid code as the vtable in ptr is no longer valid.

Where is this code from?

Reply via email to