http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56955
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-15
10:19:22 UTC ---
(In reply to comment #2)
> (In reply to comment #1)
> > I think it is talking about the memory returned by malloc/calloc will not
> > point
> > to another memory location while realloc can.
>
> I agree that's essentially what it ought to talk about, and the bug is that
> it's talking about something else -- the contents of the pointed-to memory.
Well, it _is_ actually about the content. There must be no way to compute
a valid pointer to another object from the contents of the pointed-to
memory. So if you initialize the memory to {0, 1, 2, 3, 4 ...} thus
every possible byte value is somewhere and then do
void *p = (void *)(mem[3] << 24 | mem[58] << 16 | ...);
then points-to analysis assumes that from the contents of 'mem' you
can only compute pointers to nothing (NULL). Technically for targets
where NULL is a valid poiner to an object calloc () may not be marked
with malloc.
That is, read it in the way that the code assumes the memory _may_ be
zero-initialized (but only zero-initialized) or uninitialized.