From 6e9cfdd1087b9637f8f17f7dcae3e3ef182ee3f5 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sat, 16 Oct 2021 04:21:44 +0000 Subject: [PATCH] import glibc-2.28-167.el8 --- SOURCES/glibc-rh1977614.patch | 33 +++++++++++++++++++++++++++++++++ SPECS/glibc.spec | 6 +++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 SOURCES/glibc-rh1977614.patch diff --git a/SOURCES/glibc-rh1977614.patch b/SOURCES/glibc-rh1977614.patch new file mode 100644 index 0000000..078dc68 --- /dev/null +++ b/SOURCES/glibc-rh1977614.patch @@ -0,0 +1,33 @@ +commit dfec225ee1972488bb48a8b67a2c4a13010c334a +Author: JeffyChen +Date: Fri Jul 2 17:39:24 2021 +0200 + + malloc: Initiate tcache shutdown even without allocations [BZ #28028] + + After commit 1e26d35193efbb29239c710a4c46a64708643320 ("malloc: Fix + tcache leak after thread destruction [BZ #22111]"), + tcache_shutting_down is still not early enough. When we detach a + thread with no tcache allocated, tcache_shutting_down would still be + false. + + Reviewed-by: DJ Delorie + +diff --git a/malloc/malloc.c b/malloc/malloc.c +index 00a37f218c0ab3b2..61f7bdc76064c340 100644 +--- a/malloc/malloc.c ++++ b/malloc/malloc.c +@@ -2960,12 +2960,13 @@ tcache_thread_shutdown (void) + int i; + tcache_perthread_struct *tcache_tmp = tcache; + ++ tcache_shutting_down = true; ++ + if (!tcache) + return; + + /* Disable the tcache and prevent it from being reinitialized. */ + tcache = NULL; +- tcache_shutting_down = true; + + /* Free all of the entries and the tcache itself back to the arena + heap for coalescing. */ diff --git a/SPECS/glibc.spec b/SPECS/glibc.spec index 0cecfa4..c6b6ac5 100644 --- a/SPECS/glibc.spec +++ b/SPECS/glibc.spec @@ -1,6 +1,6 @@ %define glibcsrcdir glibc-2.28 %define glibcversion 2.28 -%define glibcrelease 166%{?dist} +%define glibcrelease 167%{?dist} # Pre-release tarballs are pulled in from git using a command that is # effectively: # @@ -775,6 +775,7 @@ Patch597: glibc-rh1971664-12.patch Patch598: glibc-rh1971664-13.patch Patch599: glibc-rh1971664-14.patch Patch600: glibc-rh1971664-15.patch +Patch601: glibc-rh1977614.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2725,6 +2726,9 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Wed Oct 13 2021 Arjun Shankar - 2.28-167 +- malloc: Initiate tcache shutdown even without allocations (#1977614) + * Wed Oct 13 2021 Siddhesh Poyarekar - 2.28-166 - Fix debuginfo location for gconv-extra and make glibc Require it (#1971664).