From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: Re: ptrdiff_t overflow checks for malloc-posix etc.
Date: Sun, 18 Apr 2021 14:11:36 +0200 [thread overview]
Message-ID: <2017022.gjgHoHccuy@omega> (raw)
In-Reply-To: <64417dd6-7edb-2045-d827-2dd24b151205@cs.ucla.edu>
Paul Eggert wrote:
> Come to think of it, why do we have both malloc-gnu and malloc-posix
> modules (and similarly for calloc and realloc)?
Package owners had two decisions to make:
"Does my package ever call malloc (0)? - If yes, I need 'malloc-gnu'."
"Does my package attempt portability to native Windows? - If yes, I
need 'malloc-posix'."
> In other words, I suggest that we remove malloc-posix, realloc-posix and
> calloc-posix
Think about the effects on the package on non-glibc platforms, from the
perspective of the package owner.
For example, if my package never calls malloc (0) but desires portability
to native Windows, would I want that *every* malloc call on *all*
non-glibc platforms goes through hoops before it reaches the malloc()
function in libc?
Bruno
next prev parent reply other threads:[~2021-04-18 12:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-18 2:02 ptrdiff_t overflow checks for malloc-posix etc Paul Eggert
2021-04-18 11:59 ` Bruno Haible
2021-04-18 12:11 ` Bruno Haible [this message]
2021-04-18 20:24 ` Paul Eggert
2021-04-18 20:32 ` Bruno Haible
2021-04-18 12:13 ` Bruno Haible
2021-04-18 19:47 ` Paul Eggert
2021-04-18 20:23 ` Bruno Haible
2021-04-18 22:33 ` Paul Eggert
2021-04-19 0:04 ` Bruno Haible
2021-04-19 4:20 ` Paul Eggert
2021-04-18 12:13 ` Bruno Haible
2021-04-18 18:37 ` Paul Eggert
2021-05-09 20:19 ` Bruno Haible
2021-05-09 23:00 ` Bruno Haible
2021-05-10 8:45 ` Paul Eggert
2021-05-09 16:46 ` Bruno Haible
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
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2017022.gjgHoHccuy@omega \
--to=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
--cc=eggert@cs.ucla.edu \
/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).