Fix tcaches mutex pre- / post-fork handling
This commit is contained in:
parent
a21cfe2381
commit
a6b7af9d0f
@ -0,0 +1,28 @@
|
||||
diff -Nur jemalloc-5.2.1/src/tcache.c tmp/src/tcache.c
|
||||
--- jemalloc-5.2.1/src/tcache.c 2019-08-06 04:02:00.000000000 +0800
|
||||
+++ tmp/src/tcache.c 2021-11-16 19:12:46.889312051 +0800
|
||||
@@ -778,21 +778,15 @@
|
||||
|
||||
void
|
||||
tcache_prefork(tsdn_t *tsdn) {
|
||||
- if (!config_prof && opt_tcache) {
|
||||
- malloc_mutex_prefork(tsdn, &tcaches_mtx);
|
||||
- }
|
||||
+ malloc_mutex_prefork(tsdn, &tcaches_mtx);
|
||||
}
|
||||
|
||||
void
|
||||
tcache_postfork_parent(tsdn_t *tsdn) {
|
||||
- if (!config_prof && opt_tcache) {
|
||||
- malloc_mutex_postfork_parent(tsdn, &tcaches_mtx);
|
||||
- }
|
||||
+ malloc_mutex_postfork_parent(tsdn, &tcaches_mtx);
|
||||
}
|
||||
|
||||
void
|
||||
tcache_postfork_child(tsdn_t *tsdn) {
|
||||
- if (!config_prof && opt_tcache) {
|
||||
- malloc_mutex_postfork_child(tsdn, &tcaches_mtx);
|
||||
- }
|
||||
+ malloc_mutex_postfork_child(tsdn, &tcaches_mtx);
|
||||
}
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
Name: jemalloc
|
||||
Version: 5.2.1
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: General-purpose scalable concurrent malloc implementation
|
||||
License: BSD
|
||||
URL: http://www.canonware.com/jemalloc/
|
||||
@ -20,6 +20,7 @@ Source0: https://github.com/jemalloc/%{name}/releases/download/%{version}
|
||||
|
||||
Patch1: backport-Jemalloc-5.2.1-patch-1-fix-large-bin-index-accessed-through-cache-bin-descriptor.patch
|
||||
Patch2: backport-Jemalloc-5.2.1-patch-2-fix-undefined-behavior-in-hash.patch
|
||||
Patch3: backport-Jemalloc-5.2.1-patch-3-fix-tcaches-mutex-pre-post-fork-handling.patch
|
||||
BuildRequires: libxslt perl-generators gcc
|
||||
|
||||
%description
|
||||
@ -83,6 +84,9 @@ make check
|
||||
%{_mandir}/man3/jemalloc.3*
|
||||
|
||||
%changelog
|
||||
* Tue Nov 16 2021 guominghong <guominghong@huawei.com> - 5.2.1-4
|
||||
- Fix tcaches mutex pre-post fork handling
|
||||
|
||||
* Tue Nov 16 2021 guominghong <guominghong@huawei.com> - 5.2.1-3
|
||||
- Fix Undefined Behavior in hash.h
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user