[pcre-dev] [PATCH] add malloc and alloc_size attributes to allocation functions

2012-06-02 Thread Nuno Lopes
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

Re: [pcre-dev] [PATCH] add malloc and alloc_size attributes to allocation functions

2012-06-02 Thread Zoltán Herczeg
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

Re: [pcre-dev] [PATCH] add malloc and alloc_size attributes to allocation functions

2012-06-02 Thread Philip Hazel
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