Re: [PATCH] __attribute_malloc__ for malloc-like functions

From: Date: Thu, 28 Aug 2003 13:47:02 +0000
Subject: Re: [PATCH] __attribute_malloc__ for malloc-like functions
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-4225@lists.php.net to get a copy of this message
> So if you include any system library, GCC will silently ignore the > __attribute_malloc__, which is why it worked for me when I tested > compiling anything from the PHP tree with gcc-2.95. Unfortunately, that is a Linux feature. E.g. FreeBSD 4 has a sys/cdefs.h, but does not define anything relevant. > This should be the test to include in zend_alloc.h A check for 2.96 has been committed a while ago. What do you think about adding the malloc attribute to functions which either return NULL or an emalloc'ed pointer? I've also added a few other attributes in a couple of places. What do you think about the nonnull attribute? - Sascha

« previous php.internals (#4225) next »