public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] elf: Emit warning if tunable is ill-formatted
Date: Tue, 21 Nov 2023 20:49:07 +0000 (GMT)	[thread overview]
Message-ID: <20231121204907.1BD61385842A@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=eb9291aaa6ff6af158a1436b881ef8b834559621

commit eb9291aaa6ff6af158a1436b881ef8b834559621
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Nov 6 17:25:41 2023 -0300

    elf: Emit warning if tunable is ill-formatted
    
    So caller knows that the tunable will be ignored.
    
    Checked on x86_64-linux-gnu.
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>

Diff:
---
 elf/dl-tunables.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c
index 4d6a143f06..83265bc00b 100644
--- a/elf/dl-tunables.c
+++ b/elf/dl-tunables.c
@@ -235,6 +235,12 @@ parse_tunables (char *valstring)
 {
   struct tunable_toset_t tunables[tunables_list_size];
   int ntunables = parse_tunables_string (valstring, tunables);
+  if (ntunables == -1)
+    {
+      _dl_error_printf (
+        "WARNING: ld.so: invalid GLIBC_TUNABLES `%s': ignored.\n", valstring);
+      return;
+    }
 
   for (int i = 0; i < ntunables; i++)
     tunable_initialize (tunables[i].t, tunables[i].value);

                 reply	other threads:[~2023-11-21 20:49 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:
  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=20231121204907.1BD61385842A@sourceware.org \
    --to=azanella@sourceware.org \
    --cc=glibc-cvs@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).