Edit report at https://bugs.php.net/bug.php?id=63726&edit=1
ID: 63726
Updated by: laruence@php.net
Reported by: mike@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:
mike, where the http\object could be found? (oecl, github?)
Previous Comments:
------------------------------------------------------------------------
[2012-12-08 10:54:05] mike@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