#24699 [Ver]: Memory Leak with per-class constants

From: Date: Thu, 24 Jul 2003 21:29:59 +0000
Subject: #24699 [Ver]: Memory Leak with per-class constants
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-44721@lists.php.net to get a copy of this message
 ID:               24699
 Updated by:       helly@php.net
 Reported By:      fujimura at wakhok dot ac dot jp
 Status:           Verified
 Bug Type:         Zend Engine 2 problem
-Operating System: Linux kernel-2.4.21
+Operating System: *
 PHP Version:      5CVS-2003-07-24 (dev)
 New Comment:

marcus@zaphod /usr/src/php5 $ php -r 'class TEST { const FOO =
SEEK_CUR; }'
/usr/src/php5/Zend/zend_language_scanner.l(1111) :  Freeing 0x406842B0
(9 bytes), script=-
marcus@zaphod /usr/src/php5 $ php -r 'class TEST { const FOO = 1; }'
marcus@zaphod /usr/src/php5 $ php -r 'class TEST { const FOO =
PHP_VERSION; }'
/usr/src/php5/Zend/zend_language_scanner.l(1111) :  Freeing 0x406842B0
(12 bytes), script=-
/usr/src/php5/Zend/zend_constants.c(290) :  Freeing 0x40684268 (12
bytes), script=-
/usr/src/php5/Zend/zend_variables.c(111) : Actual location (location
was relayed)
/usr/src/php5/Zend/zend_compile.c(2349) :  Freeing 0x40684220 (16
bytes), script=-


Previous Comments:
------------------------------------------------------------------------

[2003-07-17 23:17:54] fujimura at wakhok dot ac dot jp

Description:
------------
The per-class constant causes memory leaks used with builtin
constants.

configure line:
./configure \
--with-apxs=/usr/local/apache/bin/apxs \
--disable-short-tags \
--enable-versioning \
--enable-bcmath \
--enable-dio \
--enable-mbstring \
--enable-mbregex \
--enable-wddx \
--enable-dom \
--with-iconv \
--with-xsl \
--with-openssl \
--with-zlib \
--with-bz2 \
--enable-debug


Reproduce code:
---------------
[user@loki php-src]$ php -r 'class TEST { const FOO = SEEK_CUR; }'
/home/user/php-src/Zend/zend_language_scanner.l(1111) :  Freeing
0x40435334 (9 bytes), script=-
/home/user/php-src/Zend/zend_compile.c(2405) :  Freeing 0x404352F0 (16
bytes), script=-




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24699&edit=1



Thread (4 messages)

« previous php.bugs (#44721) next »