Using __chk_fail from libstdc++

Mike Frysinger vapier@gentoo.org
Fri Jun 1 18:49:00 GMT 2012


On Friday 01 June 2012 13:48:55 Roland McGrath wrote:
> > I would like to add _FORTIFY_SOURCE-style checks to libstdc++ which call
> > __chk_fail() on failure.  Is this an acceptable use of this symbol?
> 
> It is a public exported symbol.  So I don't see a problem.

the only (unlikely) downside is that because it doesn't provide a prototype in 
a header, if we were to change the function's signature, users of it wouldn't 
notice until it was too late.  existing binary apps would work (because of 
symbol compat), but newly linked apps would not.

should we put a prototype in one of our headers somewhere ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120601/8f913ee4/attachment.sig>


More information about the Libc-alpha mailing list