1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

malloc: missing initialization of tcache in _mid_memalign

_mid_memalign includes tcache code but does not attempt to initialize
tcaches.

Reviewed-by: DJ Delorie <dj@redhat.com>
This commit is contained in:
Cupertino Miranda
2025-03-21 17:50:35 +00:00
committed by Wilco Dijkstra
parent 3e2be87832
commit 855561a1fb

View File

@ -3692,6 +3692,8 @@ _mid_memalign (size_t alignment, size_t bytes, void *address)
} }
size_t tc_idx = csize2tidx (tbytes); size_t tc_idx = csize2tidx (tbytes);
MAYBE_INIT_TCACHE ();
if (tcache_available (tc_idx)) if (tcache_available (tc_idx))
{ {
/* The tcache itself isn't encoded, but the chain is. */ /* The tcache itself isn't encoded, but the chain is. */