public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] malloc: Fix transposed arguments in sysmalloc_mmap_fallback call
@ 2023-02-28 21:20 Robert Morell
  2023-03-07 13:13 ` Adhemerval Zanella Netto
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Morell @ 2023-02-28 21:20 UTC (permalink / raw)
  To: libc-alpha; +Cc: adhemerval.zanella, dj, carlos, siddhesh

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>
---
 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 */
-- 
2.39.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] malloc: Fix transposed arguments in sysmalloc_mmap_fallback call
  2023-02-28 21:20 [PATCH] malloc: Fix transposed arguments in sysmalloc_mmap_fallback call Robert Morell
@ 2023-03-07 13:13 ` Adhemerval Zanella Netto
  2023-03-07 18:43   ` DJ Delorie
  0 siblings, 1 reply; 4+ messages in thread
From: Adhemerval Zanella Netto @ 2023-03-07 13:13 UTC (permalink / raw)
  To: Robert Morell, libc-alpha; +Cc: dj, carlos, siddhesh



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 */

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] malloc: Fix transposed arguments in sysmalloc_mmap_fallback call
  2023-03-07 13:13 ` Adhemerval Zanella Netto
@ 2023-03-07 18:43   ` DJ Delorie
  2023-03-07 18:53     ` Robert Morell
  0 siblings, 1 reply; 4+ messages in thread
From: DJ Delorie @ 2023-03-07 18:43 UTC (permalink / raw)
  To: Adhemerval Zanella Netto; +Cc: rmorell, libc-alpha, carlos, siddhesh

Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> writes:
> LGTM, I am not sure why patchwork has failed to apply this patch
> (I works manually).

The Message-ID has slashes in it, and while patchwork knows this is
possible, it seems its coverage of quoting them is incomplete.  Thus,
the CI machines are unable to download the patch from patchwork to test
it.  The "32bit" tests download the whole series, which doesn't have
this problem.  So if that test passes, ignore any "apply-patch"
failures.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] malloc: Fix transposed arguments in sysmalloc_mmap_fallback call
  2023-03-07 18:43   ` DJ Delorie
@ 2023-03-07 18:53     ` Robert Morell
  0 siblings, 0 replies; 4+ messages in thread
From: Robert Morell @ 2023-03-07 18:53 UTC (permalink / raw)
  To: DJ Delorie; +Cc: Adhemerval Zanella Netto, libc-alpha, carlos, siddhesh

On Tue, Mar 07, 2023 at 01:43:02PM -0500, DJ Delorie wrote:
> Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> writes:
> > LGTM, I am not sure why patchwork has failed to apply this patch
> > (I works manually).
> 
> The Message-ID has slashes in it, and while patchwork knows this is
> possible, it seems its coverage of quoting them is incomplete.

Apologies, that's what I get for not heeding this PSA:
https://people.kernel.org/monsieuricon/fix-your-mutt

> Thus, the CI machines are unable to download the patch from patchwork
> to test it.  The "32bit" tests download the whole series, which
> doesn't have this problem.  So if that test passes, ignore any
> "apply-patch" failures.

I've now applied the suggested workaround for mutt's Message-ID, so let
me know if you'd like me to resend the patch so it applies cleanly.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-07 18:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-28 21:20 [PATCH] malloc: Fix transposed arguments in sysmalloc_mmap_fallback call Robert Morell
2023-03-07 13:13 ` Adhemerval Zanella Netto
2023-03-07 18:43   ` DJ Delorie
2023-03-07 18:53     ` Robert Morell

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).