Using __chk_fail from libstdc++
Florian Weimer
fweimer@redhat.com
Fri Jun 1 19:11:00 GMT 2012
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
More information about the Libc-alpha
mailing list