diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-11-06 17:25:41 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-11-21 16:15:42 -0300 |
commit | eb9291aaa6ff6af158a1436b881ef8b834559621 (patch) | |
tree | 152aae3da0fbd7c30b6df0910360060ee3ebc6af /elf | |
parent | 434eca873f14f618d6c2279b54fb809fb56f2c50 (diff) | |
download | glibc-eb9291aaa6ff6af158a1436b881ef8b834559621.tar.gz glibc-eb9291aaa6ff6af158a1436b881ef8b834559621.tar.xz glibc-eb9291aaa6ff6af158a1436b881ef8b834559621.zip |
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>
Diffstat (limited to 'elf')
-rw-r--r-- | elf/dl-tunables.c | 6 |
1 files changed, 6 insertions, 0 deletions
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); |