[Bug c++/87736] New: New attributes to mark custom alloc/free function pair

bugzilla@poradnik-webmastera.com gcc-bugzilla@gcc.gnu.org
Wed Oct 24 16:38:00 GMT 2018


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

            Bug ID: 87736
           Summary: New attributes to mark custom alloc/free function pair
           Product: gcc
           Version: 8.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bugzilla@poradnik-webmastera.com
  Target Milestone: ---

This is split from Bug 87731, as recommended by Jonathan Wakely:

Valgrind provides set of macros which allows it to track custom alloc/free
functions. It would be nice if you add new attributes which could be attached
to custom alloc and free functions, so gcc could check pairing for them too. I
think of something like this:

__attribute__((malloc("MyAllocType")))
void* MyAlloc(size_t);

__attribute__((free("MyAllocType")))
void MyFree(void*);


More information about the Gcc-bugs mailing list