Re: [PATCH] __attribute_malloc__ for malloc-like functions

From: Date: Thu, 28 Aug 2003 16:02:18 +0000
Subject: Re: [PATCH] __attribute_malloc__ for malloc-like functions
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-4234@lists.php.net to get a copy of this message
account that every pointer in scope might be an alias of the resulting value. __attribute_malloc__ fixes that. (Disabled for non-GCC compilers)
    What about erealloc?  It can return the same pointer as
    passed to it.
GNU C realloc() does have the __attribute__((malloc)) itself. This seems reasonable, because, from a strict-aliasing point of view, the result of the function is either a new 'fresh' pointer, or equal to the first argument passed to realloc(), to which the strict-aliasing rules apply already. Ard

« previous php.internals (#4234) next »