FreeBSD-EN-24:13.libc++

  • Thread starter Thread starter FreeBSD Security
  • Start date Start date
Status
Not open for further replies.
F

FreeBSD Security

Guest
C++14 and later supports size-aware deletion of heap objects, when the compiler is able to determine at compile time what the exact size of a particular object
is. For this purpose, there are specific variants of "operator delete" that take an additional size_t argument. If such a variant is called, the size is passed through to the underlying allocator, which can optionally utilize this size for for more efficient deallocation.

A recent change in libc++'s implementation of std::string has introduced a potential mismatch between the actual size allocated on the heap for the contained string, and the size that is passed to "operator delete" when the string is eventually destroyed.
Continue reading...
 
Status
Not open for further replies.
Back
Top