From: mike Operating system: Arch Linux PHP version: Irrelevant Package: Scripting Engine problem Bug Type: Bug Bug description:Memleak with static properties and internal/user classes
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 bug report at https://bugs.php.net/bug.php?id=63726&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63726&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63726&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63726&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63726&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63726&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63726&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63726&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63726&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=63726&r=support Expected behavior: https://bugs.php.net/fix.php?id=63726&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63726&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63726&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63726&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63726&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63726&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63726&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=63726&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63726&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63726&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63726&r=mysqlcfg