Created on 2010-09-01.00:00:00 last changed 96 months ago
[Voted into the WP at the March, 2011 meeting as part of paper N3262.]
Proposed resolution (November, 2010) [SUPERSEDED]:
Change _N4885_18.104.22.168.4 [basic.stc.dynamic.safety] paragraph 4 as follows:
...Alternatively, an implementation may have strict pointer safety, in which case,
ifa pointer value that is not a safely-derived pointer value is dereferenced or deallocated, andthe referenced complete object is of dynamic storage duration and has notpreviously been declared reachable (_N4700_.23.11.2 [util.smartptr]) , the behavior is undefined. [Note: thisis true even if the unsafely-derived pointer value might compare equal to some safely-derived pointer value. —end note] It is implementation defined...
_N4885_22.214.171.124.4 [basic.stc.dynamic.safety] paragraph 4 only prohibits the dereferencing and deallocation of non-safely-derived pointers. This is insufficient. Explicit deallocation of storage is described as rendering invalid all pointers to that storage, with the result that all operations on such a pointer value causes undefined behavior (126.96.36.199.3 [basic.stc.dynamic.deallocation] paragraph 4). The same should be true if the storage pointed to by a non-safely-derived pointer is garbage collected. In particular, the promise of objects having distinct addresses (6.7.2 [intro.object] paragraph 6) should not apply if one of those objects is designated by a non-safely-derived pointer.
|2014-03-03 00:00:00||admin||set||status: fdis -> c++11|
|2011-04-10 00:00:00||admin||set||messages: + msg3298|
|2011-04-10 00:00:00||admin||set||status: review -> fdis|
|2010-11-29 00:00:00||admin||set||messages: + msg3073|
|2010-11-29 00:00:00||admin||set||status: open -> review|