This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: Using __chk_fail from libstdc++


On 06/01/2012 08:52 PM, Roland McGrath wrote:
I thought of that too but didn't think I cared.  We don't have an
existing header that seems appropriate.  Since it's an __ function,
it shouldn't really be declared in a "user" header.  So I guess it
would be some new header like<bits/fortify.h>.  But then libstdc++
would require a new-enough libc to have that header.  If this is
only going to be called from the library itself that doesn't seem
like a problem since it can just autoconf it.  But if Florian
intends to call it from libstdc++ header files (e.g. template code)
then it could be an issue.

I need to call it from template code. I could conceivably add a wrapper which falls back to abort if __chk_fail is not available, but I'm working on a libc-only feature anyway (_FORTIFY_SOURCE for some C++ constructs). Thus my preference is to avoid the wrapper.


--
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]