raise() marked __leaf__ is not C-compliant?

Tadeus Prastowo 0x66726565@gmail.com
Wed Oct 28 17:16:03 GMT 2020


On Wed, Oct 28, 2020 at 1:58 PM Tadeus Prastowo <0x66726565@gmail.com> wrote:
>
> On Wed, Oct 28, 2020 at 9:21 AM Florian Weimer <fweimer@redhat.com> wrote:
> >
> > * Tadeus Prastowo via Libc-help:
> >
> > > With glibc-2.30 raise() being marked __leaf__, the attached C program
> > > has an undefined behavior because it terminates when compiled with GCC
> > > using either -O0 or -Os but enters an infinite loop when using -O2.
> >
> > Yes, I think the leaf attribute is incorrect for raise and similar
> > functions.  throw()/noexcept is questionable as well because the GNU
> > implementation supports throwing from a synchronous signal handler, as
> > an extension.
>
> Thank you for your response.
>
> > I can't find a Bugzilla bug for this right now, but I think we discussed
> > it before.
>
> I will open one.

I have opened it: https://sourceware.org/bugzilla/show_bug.cgi?id=26802

> Thank you.
>
> > Thanks,
> > Florian

-- 
Best regards,
Tadeus


More information about the Libc-help mailing list