_FORTIFY_SOURCE for std::vector

Paolo Carlini paolo.carlini@oracle.com
Fri Jun 1 14:15:00 GMT 2012


On 06/01/2012 04:04 PM, Jakub Jelinek wrote:
> Well, you have the core file often (unless disabled), or could use 
> addr2line to decode the addresses. The point is that the fortification 
> checks must be very lightweight (so that people can enable them by 
> default for everything), and e.g. storing __LINE__ and __FILE__ 
> everywhere where operator[] is used would be too expensive (grow 
> .rodata too much).
I see. Then, I'm coming to the conclusion that if we start deploying 
such lightweight checks in the normal-mode library we should document 
the thing in the library documentation, under "debugging". Just a few 
sentences explaining what you and Florian just clarified, vs debug-mode too.

Paolo.



More information about the Libstdc++ mailing list