Re: Source(s) of St9bad_alloc exception

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jeff,

>It is not a no-op to pass a NULL pointer to delete. It caused a segment dump on my system, whose source I needed a good debugger to find.

As per the C++ ISO 14882 specification, it is supposed to be a no-op to pass NULL to delete or delete[].

If you're seeing a SEGV passing NULL  into delete or delete[], you've found a bug with GCC.

Presuming that the heap wasn't corrupted prior, by passing in a non-heap pointer to delete / delete[], or deleting a pointer twice.  Then all bets are off.

HTH,
--Eljay



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux