]> git.ipfire.org Git - thirdparty/glibc.git/commit
malloc: Don't use __libc_free for tcache cleanup
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Mon, 3 Oct 2022 10:58:09 +0000 (11:58 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 27 Oct 2022 13:46:55 +0000 (14:46 +0100)
commit131a8501116b1e9f0ac71aeeb513094be5f99b99
treecdf2056119f152710c09d6c5785af888c34f9f36
parent86affaf7e9121e580abd27e5d423163e75e405c9
malloc: Don't use __libc_free for tcache cleanup

__libc_free must only be used for memory given out by __libc_malloc
and similar public apis, but tcache stores a cache of already freed
pointers and itself is allocated using internal malloc apis.  Strong
double free detection in __libc_free breaks tcache_thread_shutdown,
so use a cut down version of free to reset tcache entries.
malloc/malloc.c