From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: Re: [PATCH 2/3] nptl: Remove uses of assert_perror
Date: Mon, 1 Aug 2022 17:01:15 -0300 [thread overview]
Message-ID: <e5aed22b-cab0-dc4b-2718-183de489e680@linaro.org> (raw)
In-Reply-To: <2d9e7fb75a80c85c50d6cbc227af2bde281c4fc6.1659350650.git.fweimer@redhat.com>
On 01/08/22 07:45, Florian Weimer via Libc-alpha wrote:
> __pthread_sigmask cannot actually fail with valid pointer arguments
> (it would need a really broken seccomp filter), and we do not check
> for errors elsewhere.
LGTM, thanks.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> ---
> sysdeps/nptl/gai_misc.h | 11 +++--------
> 1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/sysdeps/nptl/gai_misc.h b/sysdeps/nptl/gai_misc.h
> index c09350c2ed..4196eac6e6 100644
> --- a/sysdeps/nptl/gai_misc.h
> +++ b/sysdeps/nptl/gai_misc.h
> @@ -81,9 +81,7 @@ __gai_start_notify_thread (void)
> {
> sigset_t ss;
> sigemptyset (&ss);
> - int sigerr __attribute__ ((unused));
> - sigerr = __pthread_sigmask (SIG_SETMASK, &ss, NULL);
> - assert_perror (sigerr);
> + (void) __pthread_sigmask (SIG_SETMASK, &ss, NULL);
> }
>
> extern inline int
> @@ -106,15 +104,12 @@ __gai_create_helper_thread (pthread_t *threadp, void *(*tf) (void *),
> sigset_t ss;
> sigset_t oss;
> sigfillset (&ss);
> - int sigerr __attribute__ ((unused));
> - sigerr = __pthread_sigmask (SIG_SETMASK, &ss, &oss);
> - assert_perror (sigerr);
> + (void) __pthread_sigmask (SIG_SETMASK, &ss, &oss);
>
> int ret = __pthread_create (threadp, &attr, tf, arg);
>
> /* Restore the signal mask. */
> - sigerr = __pthread_sigmask (SIG_SETMASK, &oss, NULL);
> - assert_perror (sigerr);
> + (void) __pthread_sigmask (SIG_SETMASK, &oss, NULL);
>
> (void) __pthread_attr_destroy (&attr);
> return ret;
next prev parent reply other threads:[~2022-08-01 20:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 10:45 [PATCH 0/3] Internal asserts cleanups Florian Weimer
2022-08-01 10:45 ` [PATCH 1/3] stdio: Clean up __libc_message after unconditional abort Florian Weimer
2022-08-01 19:59 ` Adhemerval Zanella Netto
2022-08-02 8:03 ` Florian Weimer
2022-08-02 13:43 ` Adhemerval Zanella Netto
2022-08-01 10:45 ` [PATCH 2/3] nptl: Remove uses of assert_perror Florian Weimer
2022-08-01 20:01 ` Adhemerval Zanella Netto [this message]
2022-08-01 10:45 ` [PATCH 3/3] assert: Do not use stderr in libc-internal assert Florian Weimer
2022-08-01 20:04 ` Adhemerval Zanella Netto
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e5aed22b-cab0-dc4b-2718-183de489e680@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=libc-alpha@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).