This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 110b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2023-01-15


1575. Incorrect definition of “strict pointer safety”

Section: _N4885_6.7.5.5.4  [basic.stc.dynamic.safety]     Status: C++14     Submitter: Matt Austern     Date: 2012-10-17

[Moved to DR at the September, 2013 meeting.]

According to _N4885_6.7.5.5.4 [basic.stc.dynamic.safety] paragraph 4,

an implementation may have strict pointer safety, in which case a pointer value that is not a safely-derived pointer value is an invalid pointer value unless the referenced complete object is of dynamic storage duration and has previously been declared reachable (_N4885_.20.10.5 [util.dynamic.safety]).

“Safely-derived pointer” is defined only with respect to dynamically-allocated storage. Presumably pointers to objects with automatic and static storage duration should also be considered valid.

Proposed resolution (April, 2013):

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 a pointer value referring to an object with dynamic storage duration that is not a safely-derived pointer value is an invalid pointer value unless the referenced complete object is of dynamic storage duration and has previously been declared reachable (_N4885_.20.10.5 [util.dynamic.safety]). [Note:...