Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15893 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77291 invoked by uid 1010); 7 Apr 2005 14:07:51 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 72492 invoked from network); 7 Apr 2005 14:01:59 -0000 Received: from unknown (HELO pb1.pair.com) (127.0.0.1) by localhost with SMTP; 7 Apr 2005 14:01:59 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:42552] helo=mail.zend.com) by pb1.pair.com (ecelerity HEAD r(5268)) with SMTP id 7C/5C-19272-62D35524 for ; Thu, 07 Apr 2005 10:01:17 -0400 Received: (qmail 28502 invoked from network); 7 Apr 2005 14:00:48 -0000 Received: from localhost (HELO zeev-notebook.zend.com) (127.0.0.1) by localhost with SMTP; 7 Apr 2005 14:00:48 -0000 Message-ID: <5.1.0.14.2.20050407170011.05d32510@localhost> X-Sender: zeev@localhost X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 07 Apr 2005 17:00:47 +0300 To: Derick Rethans Cc: internals@lists.php.net In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] #if ZEND_ALLOC 0 patch From: zeev@zend.com (Zeev Suraski) References: @@ -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