aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2019-05-10 16:38:21 +0100
committerWilco Dijkstra <wdijkstr@arm.com>2019-05-10 16:38:21 +0100
commit5ad533e8e65092be962e414e0417112c65d154fb (patch)
treebb926e04c328e70f54fc026cbee805c52d9b2f6d /malloc/tst-malloc-thread-exit.c
parentsem_close: Use __twalk_r (diff)
downloadglibc-5ad533e8e65092be962e414e0417112c65d154fb.tar.gz
glibc-5ad533e8e65092be962e414e0417112c65d154fb.tar.bz2
glibc-5ad533e8e65092be962e414e0417112c65d154fb.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.
Diffstat (limited to 'malloc/tst-malloc-thread-exit.c')
0 files changed, 0 insertions, 0 deletions