|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-05-08 09:58 UTC] neon at neon-line dot net
I'm still unable to create/locate code which causes this leak, but I'll give it as soon as I locate it. Because there is no use to paste tons of code. Bug was found while testing phpSysInfo script (propably in XPath.class). /root/php4-STABLE-200304251730/Zend/zend_execute.c(489) : Freeing 0x087D418C (12 bytes), script=/www/system/index.php Last leak repeated 129 times /root/php4-STABLE-200304251730/Zend/zend_execute.c(1214) : Freeing 0x087D414C (12 bytes), script=/www/system/index.php Last leak repeated 50 times /root/php4-STABLE-200304251730/Zend/zend_execute.c(478) : Freeing 0x087D410C (12 bytes), script=/www/system/index.php Last leak repeated 52 times /root/php4-STABLE-200304251730/Zend/zend_operators.c(1056) : Freeing 0x087D4004 (32 bytes), script=/www/system/index.php Last leak repeated 101 times /root/php4-STABLE-200304251730/Zend/zend_hash.c(406) : Freeing 0x087CE264 (35 bytes), script=/www/system/index.php Last leak repeated 174 times /root/php4-STABLE-200304251730/Zend/zend_execute.c(278) : Freeing 0x087CE224 (12 bytes), script=/www/system/index.php Last leak repeated 116 times /root/php4-STABLE-200304251730/Zend/zend_operators.c(1049) : Freeing 0x087CE084 (4 bytes), script=/www/system/index.php Last leak repeated 70 times /root/php4-STABLE-200304251730/Zend/zend_hash.c(178) : Freeing 0x087CDEEC (32 bytes), script=/www/system/index.php Last leak repeated 74 times /root/php4-STABLE-200304251730/Zend/zend_execute.c(764) : Freeing 0x087CDA84 (12 bytes), script=/www/system/index.php Last leak repeated 261 times /root/php4-STABLE-200304251730/Zend/zend_hash.c(440) : Freeing 0x087CDE24 (64 bytes), script=/www/system/index.php Last leak repeated 58 times /root/php4-STABLE-200304251730/Zend/zend_hash.c(262) : Freeing 0x087CDDC4 (41 bytes), script=/www/system/index.php Last leak repeated 532 times /root/php4-STABLE-200304251730/ext/xml/xml.c(262) : Freeing 0x087CD7EC (8 bytes), script=/www/system/index.php Last leak repeated 57 times /root/php4-STABLE-200304251730/ext/xml/xml.c(258) : Freeing 0x08690754 (12 bytes), script=/www/system/index.php Last leak repeated 57 times /root/php4-STABLE-200304251730/Zend/zend_API.c(678) : Freeing 0x0869113C (12 bytes), script=/www/system/index.php Last leak repeated 1 time /root/php4-STABLE-200304251730/ext/xml/xml.c(512) : Freeing 0x086910FC (11 bytes), script=/www/system/index.php Last leak repeated 1 time /root/php4-STABLE-200304251730/ext/xml/xml.c(648) : Freeing 0x0868F504 (44 bytes), script=/www/system/index.php /root/php4-STABLE-200304251730/Zend/zend_API.c(562) : Actual location (location was relayed) /root/php4-STABLE-200304251730/Zend/zend_execute_API.c(341) : Freeing 0x087B1ECC (44 bytes), script=/www/system/index.php /root/php4-STABLE-200304251730/Zend/zend_variables.c(122) : Actual location (location was relayed) Last leak repeated 3 times /root/php4-STABLE-200304251730/ext/xml/xml.c(647) : Freeing 0x0877A21C (12 bytes), script=/www/system/index.php Zend/zend_language_scanner.c(4675) : Freeing 0x086C1EEC (1 bytes), script=/www/system/index.php /root/php4-STABLE-200304251730/Zend/zend_compile.c(1866) : Freeing 0x086C1E4C (12 bytes), script=/www/system/index.php Last leak repeated 3 times Sorry that I can't give detailed description. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 21:00:01 2026 UTC |
It looks like your script uses objects to represent some tree-like structure and those objects have circular references. That is, <?php class foo { var $childs; var $parent; function foo() { $this->childs = array(); $this->parent = NULL; } function appendChild(&$child) { $this->childs[] = &$child; $child->setParent($this); } function setParent(&$parent) { $this->parent = &$parent; } } $a = &new foo(); $b = &new foo(); $a->appendChild($b); ?> This causes awful leaks, but it's inevitable due to the language design; PHP employs reference-count based garbage collection.