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

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-09-09

--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
The above patch is an initial implementation of new/delete support; it works
for the simplest cases.

As noted in the commit message this patch was mostly about generalizing the
sm-malloc.cc code; the implementation of new/delete will no doubt need much
further refinement (and beyond that, the analyzer doesn't yet know about
vfuncs, exceptions, inheritance, RTTI, etc)

Specific things still to be investigated relating to new/delete (if only to add
test coverage):
* all of the various cases seen at
https://en.cppreference.com/w/cpp/memory/new/operator_new
* placement new
* global and class-specific replacements for operator new/new[]
* exceptions vs non-throwing allocators vs -fno-exceptions
* verify that ctors/dtors are simulated appropriately for both scalar and
vector new/delete

Anything else?

Note to self: see also https://en.cppreference.com/w/cpp/language/new

Reply via email to