https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88737

--- Comment #3 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 7 Jan 2019, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88737
> 
> --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> Wouldn't that break e.g. programs that
>   free (a);
>   return (uintptr_t) a % 16;
> or similar (i.e. inspect the bits of the pointer rather than what it points
> to)?
> That should be valid even after free, free doesn't modify the pointer, only
> says that what it points to is no longer available.

Indeed.  So it would be

 *a = {CLOBBER};

which is of course somewhat difficult since we do not know the size
of the object pointed to.

Reply via email to