]> git.ipfire.org Git - thirdparty/glibc.git/commit
tunables: Fix comparison of tunable values
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Tue, 16 Mar 2021 13:01:02 +0000 (18:31 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Wed, 14 Apr 2021 04:59:52 +0000 (10:29 +0530)
commite07abf59b28dc4406f8462aef4fb28b38f1cbd3b
treedc0aabb334bfe80be6525d2bc8f8454ef2b65eb9
parent3e9ca60a580e2b6854cd5314ebb0866a1f387ca8
tunables: Fix comparison of tunable values

The simplification of tunable_set interfaces took care of
signed/unsigned conversions while setting values, but comparison with
bounds ended up being incorrect; comparing TUNABLE_SIZE_T values for
example will fail because SIZE_MAX is seen as -1.

Add comparison helpers that take tunable types into account and use
them to do comparison instead.

(cherry picked from commit d1a3dcabf2f89233a99a4a9be08f9f407da0b6b4)
elf/dl-tunable-types.h
elf/dl-tunables.c
elf/dl-tunables.h