On 09/27/13 10:22 PM, Mouse wrote:
Use calloc for the array of pointers to ensure pointers are cleared
out so we don't try to free garbage if XdmcpDisposeARRAYofARRAY8 is
called before the caller sets them to valid pointers.
C does not promise that all-bits-0 (what calloc produces) gives nil
pointers (what you need here). Has X.org given up on portability to
systems where all-bits-0 is not a nil pointer? If not, this is a nasty
bug waiting to happen.
Yes. There'd already be a lot of bugs where we fail because we assume
calloc initializes pointers to NULL.
Do you know of any such systems X was ever ported to? Of the ones listed on
http://c-faq.com/null/machexamp.html, Cray is the closest to anything I've
heard of X being ported to, and I'm not sure which model it was, but it was
broken since at least X11R6.
--
-Alan Coopersmith- [email protected]
Oracle Solaris Engineering - http://blogs.oracle.com/alanc
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel