Fortification of STL
Paolo Carlini
pcarlini@suse.de
Mon Sep 3 14:16:00 GMT 2007
Hi Jakub,
>The following patch of course is not meant to be directly used,
>this should only be enabled if
>1) _FORTIFY_SOURCE is defined
>2) __OPTIMIZE__ > 0
>3) we know the C library provides the checking functions (__memcpy_chk,
> __memmove_chk, __memset_chk in this case)
>and having conditionals everywhere is jus too ugly to live with.
>Guess some __gnu_* namespace could have an __attribute__((always_inline))
>memcpy, memmove and memset routine that would either return
>__builtin_* or __builtin___*_chk depending on preprocessor macros...
>
>
Maybe it would be just matter of adding a few forwarding macros to
bits/c++config, similarly to what we have in ext/atomicity.h. Likewise,
we should probably add a bit of configury to enable the *_chk versions
in the exported library facilities.
Paolo.
More information about the Libstdc++
mailing list