aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Morell <rmorell@nvidia.com>2023-03-07 10:14:45 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-03-08 10:13:31 -0300
commit6a734e62f1557de3449c689effd2b37066ea34eb (patch)
treee9b45a5372df8f86d16f320c6905eb1600462d00
parent0b7bf0e0a486da6be7c5dde742a80c1138f9cc89 (diff)
downloadglibc-6a734e62f1557de3449c689effd2b37066ea34eb.zip
glibc-6a734e62f1557de3449c689effd2b37066ea34eb.tar.gz
glibc-6a734e62f1557de3449c689effd2b37066ea34eb.tar.bz2
malloc: Fix transposed arguments in sysmalloc_mmap_fallback call
git commit 0849eed45daa ("malloc: Move MORECORE fallback mmap to sysmalloc_mmap_fallback") moved a block of code from sysmalloc to a new helper function sysmalloc_mmap_fallback(), but 'pagesize' is used for the 'minsize' argument and 'MMAP_AS_MORECORE_SIZE' for the 'pagesize' argument. Fixes: 0849eed45daa ("malloc: Move MORECORE fallback mmap to sysmalloc_mmap_fallback") Signed-off-by: Robert Morell <rmorell@nvidia.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
-rw-r--r--malloc/malloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 5829f3f..76c50e3 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -2725,8 +2725,8 @@ sysmalloc (INTERNAL_SIZE_T nb, mstate av)
mp_.hp_flags, av);
#endif
if (mbrk == MAP_FAILED)
- mbrk = sysmalloc_mmap_fallback (&size, nb, old_size, pagesize,
- MMAP_AS_MORECORE_SIZE, 0, av);
+ mbrk = sysmalloc_mmap_fallback (&size, nb, old_size, MMAP_AS_MORECORE_SIZE,
+ pagesize, 0, av);
if (mbrk != MAP_FAILED)
{
/* We do not need, and cannot use, another sbrk call to find end */