public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Robert Morell <rmorell@nvidia.com>, libc-alpha@sourceware.org
Cc: dj@redhat.com, carlos@redhat.com, siddhesh@sourceware.org
Subject: Re: [PATCH] malloc: Fix transposed arguments in sysmalloc_mmap_fallback call
Date: Tue, 7 Mar 2023 10:13:52 -0300	[thread overview]
Message-ID: <0fd25eae-5dbd-1622-4e8b-53874d723bb7@linaro.org> (raw)
In-Reply-To: <Y/5wFE+YCYJ/yr0j@morell>



On 28/02/23 18:20, Robert Morell wrote:
> 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>

LGTM, I am not sure why patchwork has failed to apply this patch
(I works manually).

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> ---
>  malloc/malloc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/malloc/malloc.c b/malloc/malloc.c
> index 5829f3fa9b4b..76c50e3f5817 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 */

  reply	other threads:[~2023-03-07 13:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-28 21:20 Robert Morell
2023-03-07 13:13 ` Adhemerval Zanella Netto [this message]
2023-03-07 18:43   ` DJ Delorie
2023-03-07 18:53     ` Robert Morell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0fd25eae-5dbd-1622-4e8b-53874d723bb7@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=carlos@redhat.com \
    --cc=dj@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=rmorell@nvidia.com \
    --cc=siddhesh@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).