]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Call the right helper function when setting mallopt M_ARENA_MAX (BZ #21338)
authorWladimir J. van der Laan <laanwj@gmail.com>
Sat, 1 Apr 2017 07:09:09 +0000 (12:39 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Sat, 1 Apr 2017 07:09:10 +0000 (12:39 +0530)
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

ChangeLog
malloc/malloc.c

index b5d380e65ff12b18d4b2d10af27c73dc974e398f..0c95ed93b01d92dd2f63930031cc8d8a51f27221 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-04-01  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  Gabriel F. T. Gomes  <gftg@linux.vnet.ibm.com>
 
        * math/math.h: Fix check for __MATH_DECLARE_LDOUBLE.
index 994a23248e258501979138f3b07785045a60e69f..4c40e2ea19139a5f1168c523d76bba699ac12af5 100644 (file)
@@ -4904,7 +4904,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);