This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: segfault with std::allocator
Eljay Love-Jensen wrote:
Hi Toon,
The deallocate function MUST NOT by passed in a NULL pointer.
(According to ISO 14882.)
But 20.4.1.1 par 8 only says "p shall be a pointer obtained from
allocate(). n shall equal the value passed as the first argument to the
invocation of allocate which returned p". Next as a not is added that it
uses '::operator delete' and delete is allowed to be called on a NULL
pointer.