[PATCH:libXdmcp 3/4] Ensure ARRAYofARRAY8 pointers are initialized to NULL
Jasper St. Pierre
jstpierre at mecheye.net
Sat Sep 28 03:54:02 PDT 2013
Yes, we have given up on portability to Cray systems. That's the only
system, as far as I know, that ever used all-bits-0 != nil pointers.
On Sat, Sep 28, 2013 at 1:22 AM, Mouse <mouse at rodents-montreal.org> 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.
>
> /~\ The ASCII Mouse
> \ / Ribbon Campaign
> X Against HTML mouse at rodents-montreal.org
> / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>
--
Jasper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20130928/449ff842/attachment.html>
More information about the xorg-devel
mailing list