Topic: Defect Report: deallocation invalidates pointers to overlapping objects
Author: Me <anti_spam_email2003@yahoo.com>
Date: Sat, 9 Jul 2005 14:12:02 +0000 (UTC) Raw View
[ Forwarded to C++ Committee. -sdc ]
(Note: this is somewhat related to DR312)
3.7.3.2/4 "the deallocation function shall deallocate the storage
referenced by the pointer, rendering invalid all pointers referring to
any part of the deallocated storage."
5.3.5/4 "the deallocation function will deallocate the storage
referenced by the pointer thus rendering the pointer invalid. [Note:
the value of a pointer that refers to deallocated storage is
indeterminate.]"
These two need to be clarified so that a pointer to the end of an
object that might just happen to overlap with the deallocated storage
doesn't become rendered invalid.
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]