From: Ariadne Conill <ariadne@dereferenced.org>
To: Rich Felker <dalias@libc.org>
Cc: musl@lists.openwall.com
Subject: Re: [musl] perhaps we should add re[c]allocarray?
Date: Tue, 21 Jul 2020 17:21:03 -0600 [thread overview]
Message-ID: <7497387.rXyXHT2FuX@localhost> (raw)
In-Reply-To: <20200721204052.GR14669@brightrain.aerifal.cx>
Hello,
On Tuesday, July 21, 2020 2:40:53 PM MDT you wrote:
> On Tue, Jul 21, 2020 at 08:58:04PM +0200, Florian Weimer wrote:
> > * Rich Felker:
> > > recallocarray presumably needs to zero the new part which means it
> > > needs to know the old exact size, which means it depends on having
> > > either knowledge of implementation internals or a working, exact
> > > malloc_usable_size (AFAIK all legacy/existing ones except musl
> > > mallocng are broken and return a value greater than the originally
> > > allocated size).
> >
> > The caller has to pass the old member count to recallocarray, in an
> > additional argument. I think this avoids this particular issue, and
> > also makes it easy to achive interposition-safety.
>
> Ah, great, that makes it a non-issue then, and in that case I have no
> significant objections to it.
Okay great. I will work on reallocarray() first and then follow up with
recallocarray().
Ariadne
next prev parent reply other threads:[~2020-07-22 0:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 10:18 Ariadne Conill
2020-07-21 16:56 ` Markus Wichmann
2020-07-21 17:27 ` Hadrien Lacour
2020-07-21 23:19 ` Ariadne Conill
2020-07-21 18:39 ` Rich Felker
2020-07-21 18:58 ` Florian Weimer
2020-07-21 20:40 ` Rich Felker
2020-07-21 23:21 ` Ariadne Conill [this message]
2020-07-22 0:21 ` Rich Felker
2020-07-22 0:24 ` Ariadne Conill
2020-07-21 19:40 ` Leah Neukirchen
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=7497387.rXyXHT2FuX@localhost \
--to=ariadne@dereferenced.org \
--cc=dalias@libc.org \
--cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).