about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-04-01 12:39:09 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2017-04-03 22:16:34 +0530
commit74522eeeaa4a39809a28f44171e71d36a69edb58 (patch)
tree36ae83bb3bd443c99f7c0186e9f39d040ca25678
parentf035c8d055f25eaf6c93772f308afac10ce31ef2 (diff)
downloadglibc-74522eeeaa4a39809a28f44171e71d36a69edb58.tar.gz
glibc-74522eeeaa4a39809a28f44171e71d36a69edb58.tar.xz
glibc-74522eeeaa4a39809a28f44171e71d36a69edb58.zip
Call the right helper function when setting mallopt M_ARENA_MAX (BZ #21338)
Fixes a typo introduced in commit
be7991c0705e35b4d70a419d117addcd6c627319. This caused
mallopt(M_ARENA_MAX) as well as the environment variable
MALLOC_ARENA_MAX to not work as intended because it set the
wrong internal parameter.

 	[BZ #21338]
	* malloc/malloc.c: Call do_set_arena_max for M_ARENA_MAX
	instead of incorrect do_set_arena_test
-rw-r--r--ChangeLog6
-rw-r--r--malloc/malloc.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 85d6fc6192..321bf53191 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-04-03  Wladimir van der Laan  <laanwj@gmail.com>
+
+	[BZ# 21338]
+	* malloc/malloc.c: Call do_set_arena_max for M_ARENA_MAX
+	instead of incorrect do_set_arena_test
+
 2017-03-31  Slava Barinov  <v.barinov@samsung.com>
 
 	[BZ #21289]
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 4885793905..4e076638b0 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -4902,7 +4902,7 @@ __libc_mallopt (int param_number, int value)
 
     case M_ARENA_MAX:
       if (value > 0)
-	do_set_arena_test (value);
+	do_set_arena_max (value);
       break;
     }
   __libc_lock_unlock (av->mutex);