Bug #71990 [NEW]: ArrayObject memory leak
| From: | littlexiang521 at gmail dot com | Date: | Fri, 08 Apr 2016 15:55:15 +0000 |
| Subject: | Bug #71990 [NEW]: ArrayObject memory leak | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-200439@lists.php.net to get a copy of this message | ||
From: littlexiang521 at gmail dot com
Operating system: CentOS / OSX
PHP version: 5.5.34
Package: SPL related
Bug Type: Bug
Bug description:ArrayObject memory leak
Description:
------------
if some class extends ArrayObject, in some circular reference conditions
gc failed to recycle it.
see codes below, if class B is a stdClass everything works fine
Test script:
---------------
https://0bin.net/paste/CvMSmhUeaKgaE1iU#eQLFPuTHJ56KeveFKaPWoTetXtq+qgeWw+uGDjVbhiU
Expected result:
----------------
memory usage keeps low
9175040
9175040
9175040
9175040
9175040
9175040
9175040
9175040
9175040
9175040
9175040
9175040
Actual result:
--------------
OOM...
121896960
122945536
124256256
125304832
126615552
127664128
128974848
130285568
131334144
132644864
133693440
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 32 bytes) in
/home/data/songxiang/haojing/htdocs/pages/test_mem.php on line 40
--
Edit bug report at https://bugs.php.net/bug.php?id=71990&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71990&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71990&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71990&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71990&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71990&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71990&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71990&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71990&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71990&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71990&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71990&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71990&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71990&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71990&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71990&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71990&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71990&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71990&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71990&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71990&r=mysqlcfg