I'll volunteer to take on this review, since I have some experience
with __attribute__(malloc) due to my work on gperftools.
First, while I disagree that the cost to the header file is basically
0 -- I think it definitely has a negative impact on readability, at
least to some extent -- I support
Hi,
The code itself looks good, with a few comments:
} +#if defined(__GNUC__) __GNUC__ = 3
} +# define PCRE_ATTR_MALLOC __attribute__((__malloc__))
I prefer to check for __attribute__ support in autoconf, and condition
on #ifdef HAVE___ATTRIBUTE__ rather than checking for a particular
Hi,
Please find in attach a patch to add the malloc and alloc_size
attributes to PCRE's custom allocation functions.
The malloc attribute specifies that a given function behaves like
malloc, and therefore the returned pointer is fresh (i.e., doesn't
alias anything else). It is used mostly
Hi,
I feel this patch just adds unnecessary complexity to the header file. What
exactly are these optimizations? For buffer overflows, valgrind is the perfect
detection tool with its red zone based detection algorithm. What else can you
do with these macros?
Or better to ask: what is your
On Sat, 2 Jun 2012, Zoltán Herczeg wrote:
I feel this patch just adds unnecessary complexity to the header file.
What exactly are these optimizations? For buffer overflows, valgrind
is the perfect detection tool with its red zone based detection
algorithm. What else can you do with these