Edit report at https://bugs.php.net/bug.php?id=63726&edit=1

 ID:                 63726
 Updated by:         larue...@php.net
 Reported by:        m...@php.net
 Summary:            Memleak with static properties and internal/user
                     classes
 Status:             Open
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   Arch Linux
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

I can not compile DEV_2 with php-5.4...


Previous Comments:
------------------------------------------------------------------------
[2012-12-08 14:23:04] m...@php.net

yup, it's the DEV_2 branch

------------------------------------------------------------------------
[2012-12-08 13:21:23] paj...@php.net

http://pecl.php.net/package/pecl_http

sources are in http://svn.php.net/viewvc/pecl/http/

------------------------------------------------------------------------
[2012-12-08 12:46:23] larue...@php.net

mike, where the http\object could be found? (oecl, github?)

------------------------------------------------------------------------
[2012-12-08 10:54:05] m...@php.net

Description:
------------
There may occur memory leaks, if a user class extends an internal class with 
modified static properties:

█ ~/build/php-5.4-dbg-zts-gcov$ sapi/cli/php -r 
'http\Object::setDefaultErrorHandling(http\Object::EH_NORMAL);'

█ ~/build/php-5.4-dbg-zts-gcov$ sapi/cli/php -r 
'http\Object::setDefaultErrorHandling(http\Object::EH_NORMAL); class eh extends 
http\Object{}'
[Sat Dec  8 11:50:14 2012]  Script:  '-'
/home/mike/src/php-5.4-workdir/Zend/zend_API.c(3756) :  Freeing 0x7FC747BCE318 
(32 bytes), script=-
=== Total 1 memory leaks detected ===

http\Object::setDefaultErrorHandling() just does a 
zend_update_static_property_long()

Test script:
---------------
<?php
http\Object::setDefaultErrorHandling(http\Object::EH_NORMAL);
class eh extends http\Object{}

Expected result:
----------------
<no output>

Actual result:
--------------
[Sat Dec  8 11:50:14 2012]  Script:  '-'
/home/mike/src/php-5.4-workdir/Zend/zend_API.c(3756) :  Freeing 0x7FC747BCE318 
(32 bytes), script=-
=== Total 1 memory leaks detected ===


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



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

Reply via email to