This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Using __chk_fail from libstdc++
On Fri, Jun 01, 2012 at 12:50:08PM -0700, Roland McGrath wrote:
> > It can be
> > namespace __gnu_cxx
> > {
> > extern "C" void __chk_fail () __attribute__((noreturn));
> > };
> > ...
> > __gnu_cxx::__chk_fail ();
> > on the libstdc++ side IMHO (or some other appropriate namespace).
>
> That means libstdc++ would have to provide a wrapper that's just a
> tail-call to libc's __chk_fail, right? That seems fine to me, but
> Florian said he prefers to avoid a wrapper.
Nope, the above is a jmp __chk_fail at the assembly level, just the
libstdc++ header doesn't provide that prototype in :: namespace.
Jakub