#22914 [Opn->Csd]: Heavy mem-leaks in debug build with namespace/class/exception testcase

From: Date: Sun, 11 May 2003 13:26:18 +0000
Subject: #22914 [Opn->Csd]: Heavy mem-leaks in debug build with namespace/class/exception testcase
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39443@lists.php.net to get a copy of this message
ID: 22914 Updated by: moriyoshi@php.net Reported By: mfischer@php.net -Status: Open +Status: Closed Bug Type: Zend Engine 2 problem Operating System: Linux PHP Version: 5CVS-2003-03-26 (dev) New Comment: This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2003-03-26 19:38:03] mfischer@php.net The following scripts gives quite some memory leaks in a HEAD debug build: $ cat exception2_1.php <?php require_once 'exception2_2.php'; try { } catch (foo:bar::baz $e) { } ?> $ cat exception2_2.php <?php namespace foo:bar { class baz { function __construct() { } } } namespace foo { } ?> $ php exception2_1.php /home/mfischer/isrc/cvs/php5/Zend/zend_compile.c(3267) : Freeing 0x401B05B0 (32 bytes), script=exception2_1.php /home/mfischer/isrc/cvs/php5/Zend/zend_hash.c(176) : Actual location (location was relayed) /home/mfischer/isrc/cvs/php5/Zend/zend_compile.c(3266) : Freeing 0x401B054C (44 bytes), script=exception2_1.php /home/mfischer/isrc/cvs/php5/Zend/zend_compile.c(3265) : Freeing 0x401B04D8 (64 bytes), script=exception2_1.php /home/mfischer/isrc/cvs/php5/Zend/zend_hash.c(176) : Actual location (location was relayed) /home/mfischer/isrc/cvs/php5/Zend/zend_compile.c(3264) : Freeing 0x401B0464 (64 bytes), script=exception2_1.php /home/mfischer/isrc/cvs/php5/Zend/zend_hash.c(176) : Actual location (location was relayed) /home/mfischer/isrc/cvs/php5/Zend/zend_compile.c(3263) : Freeing 0x401B03F0 (64 bytes), script=exception2_1.php /home/mfischer/isrc/cvs/php5/Zend/zend_hash.c(176) : Actual location (location was relayed) /home/mfischer/isrc/cvs/php5/Zend/zend_compile.c(3286) : Freeing 0x401B0294 (296 bytes), script=exception2_1.php /home/mfischer/isrc/cvs/php5/Zend/zend_language_scanner.l(1114) : Freeing 0x401B0258 (4 bytes), script=exception2_1.php Note that doing any of the following completely removes the leak warnings: - Move content of file 2_2 completely into 2_1 - Remove the __construct function - Move namespace foo declaring before namespace foo:bar ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22914&edit=1

« previous php.bugs (#39443) next »