On 10/15/2012 07:14 PM, Ахриев Альберт wrote:

Two-three generations ago g++ was very cautious about consistency checking but 
not now.

Not sure if this is true. The at() member function performs such checking, but not operator[].

We looked at bounds checking for operator[] under -D_FORTIFY_SOURCE, but GCC isn't able to hoist the bounds check out of inner loops, so the impact is pretty significant:

<http://gcc.gnu.org/ml/libstdc++/2012-06/msg00002.html>

--
Florian Weimer / Red Hat Product Security Team

Reply via email to