diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2019-05-10 16:38:21 +0100 |
---|---|---|
committer | Wilco Dijkstra <wdijkstr@arm.com> | 2019-05-22 14:37:54 +0100 |
commit | 58d2672f64176fcb323859d3bd5240fb1cf8f25c (patch) | |
tree | 7aa2258568d71b0cb31620b3594eccc3fd3bf522 /sysdeps/unix/sysv/linux/wait.c | |
parent | 059d6750f923b2c3aa06c82befa430142ef10389 (diff) | |
download | glibc-58d2672f64176fcb323859d3bd5240fb1cf8f25c.tar glibc-58d2672f64176fcb323859d3bd5240fb1cf8f25c.tar.gz glibc-58d2672f64176fcb323859d3bd5240fb1cf8f25c.tar.bz2 glibc-58d2672f64176fcb323859d3bd5240fb1cf8f25c.zip |
Fix tcache count maximum (BZ #24531)
The tcache counts[] array is a char, which has a very small range and thus
may overflow. When setting tcache_count tunable, there is no overflow check.
However the tunable must not be larger than the maximum value of the tcache
counts[] array, otherwise it can overflow when filling the tcache.
[BZ #24531]
* malloc/malloc.c (MAX_TCACHE_COUNT): New define.
(do_set_tcache_count): Only update if count is small enough.
* manual/tunables.texi (glibc.malloc.tcache_count): Document max value.
(cherry picked from commit 5ad533e8e65092be962e414e0417112c65d154fb)
Diffstat (limited to 'sysdeps/unix/sysv/linux/wait.c')
0 files changed, 0 insertions, 0 deletions