This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bounds checking in STL containers


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]