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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-01-08

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #9)
> (In reply to Nicholas Miell from comment #8) 
> > What appears to actually be happening is that the libstdc++ operator
> > new(std::size_t size, std::align_val_t alignment) is calling glibc's
> > aligned_alloc, and then the libstdc++ operator delete(void* ptr,
> > std::align_val_t alignment) is calling std::free(), which is supplied by
> > tcmalloc.
> 
> 
> aligned_alloc is part of C11 and C++17 and is required to be free'd by
> std::free (or free in the C11 case).
> 
> So this seems like a bug in tcmalloc not supplying an override of the C11
> function aligned_alloc.
> 
> You would run into the same issue with a C11 application that does the same
> too.


From
https://github.com/gperftools/gperftools/blob/365060c4213a48adb27f63d5dfad41b3dfbdd62e/NEWS#L514
:
> == 30 Nov 2017 ==
> gperftools 2.6.2 is out!
> Most notable change is recently added support for C++17 over-aligned



So this is depedent on the version of tcmalloc that you are using.
What version are you using?

Reply via email to