[quagga-dev 8283] zalloc rules

Greg Troxel gdt at ir.bbn.com
Fri Sep 17 18:11:02 BST 2010

I looked at the first patch in balajig git, and had already sent a query
to the list a while ago.  The basic issue is that I think it's a serious
bug that zrealloc or zfree would ever be called with NULL.  I realize
realloc can take NULL, but within quagga it seems obvious that only
pointers from zalloc/etc. are acceptable.  So I pushed a commit with
comments about this.

Now, the question is when this happens, and what should be done.  It
seems like we have assert support in lib/zassert.h, and that including
that in memory.c will let people find the problems and then we can see
what the situation is.  I don't want to put that on master, because it
will turn semi-bad behavior into crashes, which is not good for all
environments, so I'll open up a topic branch for it.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20100917/4416b450/attachment-0001.sig>

More information about the Quagga-dev mailing list