Re: #if ZEND_ALLOC 0 patch

From: Date: Thu, 07 Apr 2005 14:00:47 +0000
Subject: Re: #if ZEND_ALLOC 0 patch
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-15893@lists.php.net to get a copy of this message
@@ -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; -#define USE_ZEND_ALLOC 1 +#define USE_ZEND_ALLOC 0 Nice try ;) Committed, thanks. Zeev At 16:42 07/04/2005, Derick Rethans wrote:
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't do that differently with strdup. I'd like to commit this patch to all branches. regards, Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.internals (#15893) next »