unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar via Libc-alpha <libc-alpha@sourceware.org>
To: Florian Weimer <fweimer@redhat.com>,
	Siddhesh Poyarekar via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH] __cxa_thread_atexit_impl: Return -1 on allocation failure
Date: Wed, 28 Jul 2021 12:56:08 +0530	[thread overview]
Message-ID: <8336a4c1-15bb-c3d2-6afe-cb9db60178dc@sourceware.org> (raw)
In-Reply-To: <87mtq6ap0e.fsf@oldenburg.str.redhat.com>

On 7/28/21 12:44 PM, Florian Weimer wrote:
> * Siddhesh Poyarekar via Libc-alpha:
> 
>> Return -1 in the unlikely event that allocation fails when trying to
>> register a TLS destructor.
> 
> This is bug 18524.  As said on the bug, the interface is broken.  We
> really need to rework C++ global destructor support so that these
> dynamic memory allocations become unnecessary.
> 
> The GCC-generated caller code does not check the return value (and could
> do anything with it anyway).  You probable need to add __libc_fatal.

Hmm, so I started with __libc_fatal and changed it to return -1 when I 
saw that the libstdc++ compat implementation did the same.  Now I see 
that there's no check for return value from the call.  I'll update the 
patch with __libc_fatal and resend.

Thanks,
Siddhesh

  reply	other threads:[~2021-07-28  8:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-28  6:25 [PATCH] __cxa_thread_atexit_impl: Return -1 on allocation failure Siddhesh Poyarekar via Libc-alpha
2021-07-28  7:14 ` Florian Weimer via Libc-alpha
2021-07-28  7:26   ` Siddhesh Poyarekar via Libc-alpha [this message]
2021-07-28  7:59 ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8336a4c1-15bb-c3d2-6afe-cb9db60178dc@sourceware.org \
    --to=libc-alpha@sourceware.org \
    --cc=fweimer@redhat.com \
    --cc=siddhesh@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).