Created on 2010-09-01.00:00:00 last changed 130 months ago
[Voted into the WP at the March, 2011 meeting as part of paper N3262.]
Proposed resolution (November, 2010) [SUPERSEDED]:
Change _N4885_6.7.5.5.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 isdereferenced or deallocated, andan invalid pointer value, unless the referenced complete object is of dynamic storage duration and hasnotpreviously been declared reachable (_N4700_.23.11.2 [util.smartptr]), the behavior is undefined. [Note:thisThe effect of using an invalid pointer value (including passing it to a deallocation function) is undefined, see 6.7.5.5.3 [basic.stc.dynamic.deallocation]. This is true even if the unsafely-derived pointer value might compare equal to some safely-derived pointer value. —end note] It is implementation defined...
_N4885_6.7.5.5.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 (6.7.5.5.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.
History | |||
---|---|---|---|
Date | User | Action | Args |
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 |
2010-09-01 00:00:00 | admin | create |