This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC][PATCH v2] Add reallocarray function.
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: Rich Felker <dalias at libc dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 20 May 2014 13:47:31 -0700
- Subject: Re: [RFC][PATCH v2] Add reallocarray function.
- Authentication-results: sourceware.org; auth=none
- References: <5379208F dot 8030000 at cs dot ucla dot edu> <2080621 dot 6fAB4UMNoY at descartes> <Pine dot LNX dot 4 dot 64 dot 1405191501120 dot 25418 at digraph dot polyomino dot org dot uk> <20140520020108 dot GV507 at brightrain dot aerifal dot cx> <mvm61l0rhj3 dot fsf at hawking dot suse dot de> <537B7849 dot 1010208 at cs dot ucla dot edu> <20140520170126 dot GY507 at brightrain dot aerifal dot cx>
On 05/20/2014 10:01 AM, Rich Felker wrote:
Is the concern
that *new->something might alias new (because new==old happens to be
true and the object contained a pointer to itself or part of itself)
or that *new->something merely can alias other existing memory
(whereas GCC assumes it never can)?
The latter, if I understand your question correctly. I added a proposed
patch to the GCC documentation here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56955#c6
Please give it a read, and follow up there if you have further questions.