public inbox for
help / color / mirror / Atom feed
From: Samuel Thibault <>
Subject: [glibc] htl: Check error returned by __getrlimit
Date: Mon,  2 Jan 2023 10:36:16 +0000 (GMT)	[thread overview]
Message-ID: <> (raw);h=3a614f39e61140dd2478ce5b7564ec8a53269ea4

commit 3a614f39e61140dd2478ce5b7564ec8a53269ea4
Author: Samuel Thibault <>
Date:   Mon Jan 2 01:01:28 2023 +0100

    htl: Check error returned by __getrlimit

 htl/pt-create.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/htl/pt-create.c b/htl/pt-create.c
index 5d37edbbff..d3847b69ea 100644
--- a/htl/pt-create.c
+++ b/htl/pt-create.c
@@ -136,8 +136,8 @@ __pthread_create_internal (struct __pthread **thread,
   if (stacksize == 0)
       struct rlimit rlim;
-      __getrlimit (RLIMIT_STACK, &rlim);
-      if (rlim.rlim_cur != RLIM_INFINITY)
+      err = __getrlimit (RLIMIT_STACK, &rlim);
+      if (err == 0 && rlim.rlim_cur != RLIM_INFINITY)
 	stacksize = rlim.rlim_cur;
       if (stacksize == 0)

                 reply	other threads:[~2023-01-02 10:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

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

  git send-email \ \ \ \

* 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).