> From: Derek Price [mailto:[EMAIL PROTECTED]
> 
> Assuming you mean that this works, I think it will be fine:
> 
>     p = realloc (NULL, 0);
>     free (p);

This definitely works:

        char c, *p;

        p = realloc (NULL, 0);
        c = p[0];
        free (p);

Referencing p[0] is fine, writing p[0] is NOT a trap or fault.

IMO debug run time library "free" does a guard byte test.



_______________________________________________
Bug-cvs mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/bug-cvs

Reply via email to