public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Corinna Vinschen <vinschen@redhat.com>
To: Keith Packard <keithp@keithp.com>
Cc: newlib@sourceware.org, Szabolcs Nagy <szabolcs.nagy@arm.com>,
	Joey Ye <joey.ye@arm.com>
Subject: Re: [PATCH 3/4] libm/stdlib: Realloc when shrinking by 2* or more
Date: Mon, 17 Aug 2020 11:54:10 +0200	[thread overview]
Message-ID: <20200817095410.GF3272@calimero.vinschen.de> (raw)
In-Reply-To: <877du2kq6y.fsf@keithp.com>

On Aug 13 17:48, Keith Packard via Newlib wrote:
> Corinna Vinschen <vinschen@redhat.com> writes:
> 
> > Just as I wrote above.
> 
> Done. In reviewing this code further, I've done a bunch more
> restructuring to make the code 64-bit clean, removing the 'offset'
> mechanism and letting the compiler compute alignment requirements for
> us. The diff for that is pretty large though; would there be an interest
> in looking at it? I ask because preparing that patch for newlib would
> take several hours as it's currently only in picolibc.
> 
> https://github.com/keith-packard/picolibc/commit/fd2d18bb5ab442f16789c243648d07b4ec8e2b29
> 
> This also uncovers problems when building with newer GCC versions which
> "helpfully optimize" common malloc/free operations that cause incorrect
> code to be generated in some configurations of the library.
> 
> -- 
> -keith

I took a brief look and I'm just wondering why you don't mention
renaming the functions and dropping the wrapper macros in the commit
message.

As for interest, we may want to ask the ARM guys since they provided the
code originally.  Cc'ing Szabolcs as well as Joey, the original author.


Corinna


  reply	other threads:[~2020-08-17  9:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11 23:05 [PATCH 0/4] Fixes for memory allocation bugs Keith Packard
2020-08-11 23:05 ` [PATCH 1/4] libc/stdlib: Use __builtin_mul_overflow for reallocarray and calloc Keith Packard
2020-08-12  8:13   ` Corinna Vinschen
2020-08-11 23:05 ` [PATCH 2/4] libm/stdlib: don't read past source in nano_realloc Keith Packard
2020-08-12  8:01   ` Corinna Vinschen
2020-08-11 23:05 ` [PATCH 3/4] libm/stdlib: Realloc when shrinking by 2* or more Keith Packard
2020-08-12  8:08   ` Corinna Vinschen
2020-08-12 15:01     ` Keith Packard
2020-08-13  7:59       ` Corinna Vinschen
2020-08-14  0:48         ` Keith Packard
2020-08-17  9:54           ` Corinna Vinschen [this message]
2020-08-11 23:05 ` [PATCH 4/4] libm/stdlib: Recover from realloc failure when shrinking Keith Packard

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=20200817095410.GF3272@calimero.vinschen.de \
    --to=vinschen@redhat.com \
    --cc=joey.ye@arm.com \
    --cc=keithp@keithp.com \
    --cc=newlib@sourceware.org \
    --cc=szabolcs.nagy@arm.com \
    /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).