Re: [PHP-DEV] #if ZEND_ALLOC 0 patch

2005-04-07 Thread Derick Rethans
On Thu, 7 Apr 2005, Zeev Suraski wrote: > @@ -80,7 +80,7 @@ ZEND_API void *_erealloc(void *ptr, size > ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC > ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC; > ZEND_API char *_estrndup(const char *s, unsigned int length ZEND_FILE_LINE_DC > ZEND_F

Re: [PHP-DEV] #if ZEND_ALLOC 0 patch

2005-04-07 Thread Zeev Suraski
@@ -80,7 +80,7 @@ ZEND_API void *_erealloc(void *ptr, size ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC; ZEND_API char *_estrndup(const char *s, unsigned int length ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC; -#defin

[PHP-DEV] #if ZEND_ALLOC 0 patch

2005-04-07 Thread Derick Rethans
Hello Andi, the following patch fixes issues when ZEND_ALLOC is set to 0 (to be able to debug memory related issues in / with the engine): http://files.derickrethans.nl/patches/zend-alloc-strndup-20050407.patch This is because estrdup needs to allocate one more byte than the length and you can