Use upstream variant of fix for 740506.
This commit is contained in:
parent
70c5758f43
commit
7b27d27fa9
@ -3,8 +3,14 @@
|
|||||||
* malloc/malloc.c (mALLOPt): Clamp arena_test based on
|
* malloc/malloc.c (mALLOPt): Clamp arena_test based on
|
||||||
the value of arena_max.
|
the value of arena_max.
|
||||||
|
|
||||||
|
commit 41b81892f11fe1353123e892158b53de73863d62
|
||||||
|
Author: Ulrich Drepper <drepper@gmail.com>
|
||||||
|
Date: Tue Jan 31 14:42:34 2012 -0500
|
||||||
|
|
||||||
|
Handle ARENA_TEST correctly
|
||||||
|
|
||||||
diff --git a/malloc/arena.c b/malloc/arena.c
|
diff --git a/malloc/arena.c b/malloc/arena.c
|
||||||
index cb8548b..00f1da5 100644
|
index d3cf4b9..b1c9469 100644
|
||||||
--- a/malloc/arena.c
|
--- a/malloc/arena.c
|
||||||
+++ b/malloc/arena.c
|
+++ b/malloc/arena.c
|
||||||
@@ -828,7 +828,7 @@ arena_get2(mstate a_tsd, size_t size)
|
@@ -828,7 +828,7 @@ arena_get2(mstate a_tsd, size_t size)
|
||||||
@ -16,20 +22,19 @@ index cb8548b..00f1da5 100644
|
|||||||
{
|
{
|
||||||
int n = __get_nprocs ();
|
int n = __get_nprocs ();
|
||||||
|
|
||||||
diff --git a/malloc/malloc.c b/malloc/malloc.c
|
@@ -842,7 +842,14 @@ arena_get2(mstate a_tsd, size_t size)
|
||||||
index 8608083..f8d32da 100644
|
}
|
||||||
--- a/malloc/malloc.c
|
repeat:;
|
||||||
+++ b/malloc/malloc.c
|
size_t n = narenas;
|
||||||
@@ -4842,6 +4842,12 @@ int mALLOPt(int param_number, int value)
|
- if (__builtin_expect (n <= mp_.arena_test || n < narenas_limit, 0))
|
||||||
break;
|
+ /* NB: the following depends on the fact that (size_t)0 - 1 is a
|
||||||
#endif
|
+ very large number and that the underflow is OK. If arena_max
|
||||||
}
|
+ is set the value of arena_test is irrelevant. If arena_test
|
||||||
+#ifdef PER_THREAD
|
+ is set but narenas is not yet larger or equal to arena_test
|
||||||
+ /* Clamp ARENA_TEST from ARENA_MAX to avoid creating too many
|
+ narenas_limit is 0. There is no possibility for narenas to
|
||||||
+ arenas. */
|
+ be too big for the test to always fail since there is not
|
||||||
+ if (mp_.arena_max > 0 && mp_.arena_max <= mp_.arena_test)
|
+ enough address space to create that many arenas. */
|
||||||
+ mp_.arena_test = mp_.arena_max - 1;
|
+ if (__builtin_expect (n <= narenas_limit - 1, 0))
|
||||||
+#endif
|
{
|
||||||
(void)mutex_unlock(&av->mutex);
|
if (catomic_compare_and_exchange_bool_acq (&narenas, n + 1, n))
|
||||||
return res;
|
goto repeat;
|
||||||
}
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
Summary: The GNU libc libraries
|
Summary: The GNU libc libraries
|
||||||
Name: glibc
|
Name: glibc
|
||||||
Version: %{glibcversion}
|
Version: %{glibcversion}
|
||||||
Release: 7%{?dist}
|
Release: 8%{?dist}
|
||||||
# GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
|
# GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
|
||||||
# Things that are linked directly into dynamically linked programs
|
# Things that are linked directly into dynamically linked programs
|
||||||
# and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
|
# and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
|
||||||
@ -47,7 +47,7 @@ Patch2: %{name}-ia64-lib64.patch
|
|||||||
# thread A has unlocked on the error path
|
# thread A has unlocked on the error path
|
||||||
# There's an alternate approach using mmap after detecting an error that needs discussion
|
# There's an alternate approach using mmap after detecting an error that needs discussion
|
||||||
Patch3: %{name}-rh757881.patch
|
Patch3: %{name}-rh757881.patch
|
||||||
# Sent upstream, awaiting responses
|
# From upstream.
|
||||||
Patch4: %{name}-rh740506.patch
|
Patch4: %{name}-rh740506.patch
|
||||||
# Not sure of upstream status
|
# Not sure of upstream status
|
||||||
Patch5: %{name}-rh730856.patch
|
Patch5: %{name}-rh730856.patch
|
||||||
@ -1152,6 +1152,9 @@ rm -f *.filelist*
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Feb 1 2012 Jeff Law <law@redhat.com> - 2.15-8
|
||||||
|
- Use upstream variant of fix for 740506.
|
||||||
|
|
||||||
* Sun Jan 29 2012 Jeff Law <law@redhat.com> - 2.15-7
|
* Sun Jan 29 2012 Jeff Law <law@redhat.com> - 2.15-7
|
||||||
- Sort objects before relocations (sw#13618)
|
- Sort objects before relocations (sw#13618)
|
||||||
- Fix bogus sort code that was copied from dl-deps.c.
|
- Fix bogus sort code that was copied from dl-deps.c.
|
||||||
|
Loading…
Reference in New Issue
Block a user