_FORTIFY_SOURCE for std::vector

Florian Weimer fweimer@redhat.com
Fri Jun 1 15:31:00 GMT 2012


On 06/01/2012 05:09 PM, Jakub Jelinek wrote:
>> __chk_fail it is, then.  This means that the test case will be
>> specific to GNU libc platforms.  How can I mark it as such?
>
> { target *-*-linux* } or so?

Wouldn't this match Bionic libc environments, too?

> Note, __chk_fail () isn't prototyped in glibc headers, so you want
> probably in the checking method declare it in some __gnu* namespace
> as extern "C" __chk_fail () __attribute__((unused));
> and then use.

Good point, thanks.  I'm asking the libc folks if we may use this symbol 
from libstdc++, just to be on the safe side.

-- 
Florian Weimer / Red Hat Product Security Team



More information about the Libstdc++ mailing list